When copying files into a ext4 partition in an image it seems that the journal is getting corrupt. When booting I see errors like this, and sometimes the files are just not there despite "wic ls" did show them. ext4_lookup:1857: inode #2: comm ls: deleted inode referenced: Workaround (to fix the journal is to do this after copying) sync e2fsck -y tmp/deploy/images/qemuarm64/image-qemuarm64.ext4
That workaround feels reasonable enough, can you send a patch?
Sorry for the noise - could not reproduce it. Here is a snipplet of my idea to disable journal - but hence it disappeared I close the bug. diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py index 674ccfc244..03cd508386 100644 --- a/scripts/lib/wic/engine.py +++ b/scripts/lib/wic/engine.py @@ -280,7 +280,7 @@ class Disk: def __getattr__(self, name): """Get path to the executable in a lazy way.""" if name in ("mdir", "mcopy", "mdel", "mdeltree", "sfdisk", "e2fsck", - "resize2fs", "mkswap", "mkdosfs", "debugfs","blkid"): + "resize2fs", "tune2fs", "mkswap", "mkdosfs", "debugfs","blkid"): aname = "_%s" % name if aname not in self.__dict__: setattr(self, aname, shutil.which(name, path=self.paths)) @@ -332,9 +332,12 @@ class Disk: if self.partitions[pnum].fstype.startswith('ext'): if isinstance(src, str): + # disable journal, since this is not proper updated + exec_cmd("{} -fO ^has_journal {}".format(self.tune2fs, self._get_part_image(pnum))) + # creating copy cmd