[elbe-devel] [PATCH v2 2/2] Do tune2fs of fstabentry before unmouting loop devices
Olivier Dion
dion at linutronix.de
Tue Jun 25 17:24:34 CEST 2019
On 2019-06-25T16:31:47+0200, Torben Hohn wrote:
> ok... please send pull request...
The following changes since commit 8a52a2b105b6f6d5d818bad6c150a04a9db8a20d:
rpcaptcache: make mark_install_devpkgs() also mark -dbgsym packages (2019-06-18 16:28:13 +0200)
are available in the git repository at:
lxcvs:/linutronix/elbe/elbe devel/dion/issue-191
for you to fetch changes up to fb1a18b4aa44ceed6b1ce52840ad3f43904aee09:
Do tune2fs of fstabentry before unmouting loop devices (2019-06-25 16:34:33 +0200)
----------------------------------------------------------------
Olivier Dion (2):
Add tune2fs for fstabentry
Do tune2fs of fstabentry before unmouting loop devices
elbepack/fstab.py | 6 ++++++
elbepack/hdimg.py | 1 +
2 files changed, 7 insertions(+)
diff --git a/elbepack/fstab.py b/elbepack/fstab.py
index 5605670b..0cd569c6 100644
--- a/elbepack/fstab.py
+++ b/elbepack/fstab.py
@@ -7,6 +7,7 @@
import os
+from elbepack.shellhelper import system
def get_mtdnum(xml, label):
tgt = xml.node("target")
@@ -88,6 +89,7 @@ class fstabentry(object):
self.fstype = entry.text("fs/type")
self.mkfsopt = entry.text("fs/mkfs", default="")
self.passno = entry.text("fs/passno", default="0")
+ self.tune = entry.text("fs/tune2fs", default=None)
# These attributes are filled later
# using set_geometry()
@@ -140,3 +142,7 @@ class fstabentry(object):
def losetup(self, outf, loopdev):
outf.do('losetup -o%d --sizelimit %d /dev/%s "%s"' %
(self.offset, self.size, loopdev, self.filename))
+
+ def tuning(self, loopdev):
+ if self.tune:
+ system('tune2fs "%s" %s' % (self.tune, loopdev))
diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
index 771c9a35..e6dc2a65 100644
--- a/elbepack/hdimg.py
+++ b/elbepack/hdimg.py
@@ -426,6 +426,7 @@ def create_label(outf, disk, part, ppart, fslabel, target, grub):
(os.path.join(
target, "filesystems", entry.id), os.path.join(
target, "imagemnt")), allow_fail=True)
+ entry.tuning("/dev/loop0")
outf.do('umount /dev/loop0')
outf.do('losetup -d /dev/loop0')
--
Olivier Dion
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
More information about the elbe-devel
mailing list