]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
common/defrag: rework _require_defrag for ext4
authorEric Whitney <enwlinux@gmail.com>
Thu, 4 Aug 2016 20:02:46 +0000 (16:02 -0400)
committerEryu Guan <eguan@redhat.com>
Fri, 5 Aug 2016 05:36:51 +0000 (13:36 +0800)
commit60f3461b7d993a3f28fde68dcb51c5d19a14329b
treede3c275f7d2948d14a5bc15909abeed70f0f3ed5
parent73f8e854f61e110274bde563ea627c523fb2b606
common/defrag: rework _require_defrag for ext4

The existing _require_defrag function rejects ext4 file systems
mounted with the dax option or constructed without extents.
However, there are also a number of other ext4 file system
configuration cases that do not currently support online defrag,
including encryption, data journaling, and bigalloc.  In the future,
online defrag functionality may be implemented for some of these,
and new configuration cases could be added that don't support it.

Rather than add a laundry list of mount and file system
configuration options to the existing _require_defrag function that
will need ongoing maintenance, use the available src/e4compact
program to directly determine whether the kernel supports ext4's
move extent ioctl on the test file system.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/defrag