]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: partition: Run fsck on EXT file systems
authorDaniel Schultz <d.schultz@phytec.de>
Mon, 3 Apr 2017 07:47:55 +0000 (09:47 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Aug 2017 14:11:36 +0000 (15:11 +0100)
Mkfs may create EXT file systems which can only be optimized by fsck
and not by itself, e.g. directory optimization (in Pass 3A).

To prevent those optimizations during runtime, it will be performed after
the creation of an EXT file system.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
scripts/lib/wic/partition.py

index 3b3bd2d78ff41e27cd4ddecb06481e4ce9396f64..ec3aa6622c513587634e59c996f16663974a932b 100644 (file)
@@ -239,6 +239,9 @@ class Partition():
             (self.fstype, extra_imagecmd, rootfs, label_str, rootfs_dir)
         exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
 
+        mkfs_cmd = "fsck.%s -pvfD %s || [ $? -le 3 ]" % (self.fstype, rootfs)
+        exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
+
     def prepare_rootfs_btrfs(self, rootfs, oe_builddir, rootfs_dir,
                              native_sysroot, pseudo):
         """