Skip to contentSkip to conversation

wic: partition: Run fsck on EXT file systems

PATCH Superseded Daniel Schultz 2 participants 4 messages Mar 31, 2017 – Apr 3, 2017

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 wic: partition: Run fsck on EXT file systems

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.

---
 scripts/lib/wic/partition.py | 3 +++
 1 file changed, 3 insertions(+)
scripts/lib/wic/partition.py +3 -0
index 3b3bd2d..152eb7b 100644
@@ -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" % (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):
         """
Signature · 1 line
1.9.1
#1 lore raw
Quoted 16 lines · Daniel Schultz

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.

---
 scripts/lib/wic/partition.py | 3 +++
 1 file changed, 3 insertions(+)
scripts/lib/wic/partition.py +0 -0
index 3b3bd2d..152eb7b 100644

scripts/lib/wic/partition.py class Partition(): · line 244

Quoted 6 lines
scripts/lib/wic/partition.py +3 -0
@@ -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" % (self.fstype, rootfs)
+        exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
+

is this required on master too ? if yes I would suggest to propose it for master and then do a backport.

Quoted 4 lines
scripts/lib/wic/partition.py +0 -0
     def prepare_rootfs_btrfs(self, rootfs, oe_builddir, rootfs_dir,
                              native_sysroot, pseudo):
         """
#2 lore raw

Hi,

Am 31.03.2017 um 19:14 schrieb Khem Raj:

Quoted 22 lines · Daniel Schultz
Quoted 19 lines

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.

---
 scripts/lib/wic/partition.py | 3 +++
 1 file changed, 3 insertions(+)
scripts/lib/wic/partition.py +0 -0
index 3b3bd2d..152eb7b 100644
@@ -239,6 +239,9 @@ class Partition():
             (self.fstype, extra_imagecmd, rootfs, label_str, rootfs_dir)
         exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
 
Quoted 7 lines

scripts/lib/wic/partition.py class Partition(): · line 244

Quoted 3 lines
scripts/lib/wic/partition.py +3 -0
+        mkfs_cmd = "fsck.%s -pvfD %s" % (self.fstype, rootfs)
+        exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
+

is this required on master too ? if yes I would suggest to propose it for master and then do a backport.

Yes, it's already on master. If I would backport it, I also have to backport a patch for e2fsprogs. Since the new release is very close I would prefer this patch.

Quoted 5 lines
Quoted 4 lines
scripts/lib/wic/partition.py +0 -0
     def prepare_rootfs_btrfs(self, rootfs, oe_builddir, rootfs_dir,
                              native_sysroot, pseudo):
         """
Signature · 3 lines
Mit freundlichen Grüßen,
With best regards,
  Daniel Schultz
#3 lore raw
Quoted 36 lines · Daniel Schultz

Hi,

Am 31.03.2017 um 19:14 schrieb Khem Raj:

Quoted 24 lines · Daniel Schultz
Quoted 20 lines

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.

---
 scripts/lib/wic/partition.py | 3 +++
 1 file changed, 3 insertions(+)
scripts/lib/wic/partition.py +0 -0
index 3b3bd2d..152eb7b 100644
@@ -239,6 +239,9 @@ class Partition():
             (self.fstype, extra_imagecmd, rootfs, label_str, rootfs_dir)
         exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
 
Quoted 8 lines

scripts/lib/wic/partition.py class Partition(): · line 244

Quoted 3 lines
scripts/lib/wic/partition.py +3 -0
+        mkfs_cmd = "fsck.%s -pvfD %s" % (self.fstype, rootfs)
+        exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
+

is this required on master too ? if yes I would suggest to propose it for master and then do a backport.

Quoted 4 lines

Yes, it's already on master. If I would backport it, I also have to backport a patch for e2fsprogs.
Since the new release is very close I would prefer this patch.

it might be fine for your internal release. For upstream release branches we should go by backports.