From: mao xiaojuan Date: Mon, 9 Apr 2018 11:27:12 +0000 (+0800) Subject: Apply btrfs mount options "--fsoptions=compress". X-Git-Tag: released-tools-18.01.7~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc8bbff0225786417593d517db0f40c8f783f001;p=tools%2Fmic.git Apply btrfs mount options "--fsoptions=compress". Change-Id: Ic286b0c43dd9fb376ab643170e9a3387156c4d96 --- diff --git a/mic/imager/loop.py b/mic/imager/loop.py old mode 100755 new mode 100644 index 268ba84..04abd0a --- a/mic/imager/loop.py +++ b/mic/imager/loop.py @@ -160,6 +160,7 @@ class LoopImageCreator(BaseImageCreator): 'name': imgname, 'size': part.size or 4096L * 1024 * 1024, 'fstype': part.fstype or 'ext3', + 'fsopts': part.fsopts or None, 'aft_fstype': aft_fstype or None, 'extopts': part.extopts or None, 'vdfsopts': part.vdfsopts or None, @@ -336,7 +337,6 @@ class LoopImageCreator(BaseImageCreator): # Actual implementation # def _mount_instroot(self, base_on=None): - if base_on and os.path.isfile(base_on): self._imgdir = os.path.dirname(base_on) imgname = os.path.basename(base_on) @@ -361,6 +361,7 @@ class LoopImageCreator(BaseImageCreator): for loop in self._instloops: fstype = loop['fstype'] + fsopt = loop['fsopts'] mp = os.path.join(self._instroot, loop['mountpoint'].lstrip('/')) size = loop['size'] * 1024L * 1024L imgname = loop['name'] @@ -381,6 +382,7 @@ class LoopImageCreator(BaseImageCreator): fstype, self._blocksize, loop['label'], + fsopt, fsuuid = loop['uuid']) if fstype in ("ext2", "ext3", "ext4"): @@ -389,7 +391,7 @@ class LoopImageCreator(BaseImageCreator): try: msger.verbose('Mounting image "%s" on "%s"' % (imgname, mp)) fs.makedirs(mp) - loop['loop'].mount(init_expand=loop['init_expand']) + loop['loop'].mount(fsopt, init_expand=loop['init_expand']) # Make an autogenerated uuid avaialble in _get_post_scripts_env() if loop['kspart'] and loop['kspart'].uuid is None and \ loop['loop'].uuid: