]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
ext4: defrag not supported with DAX
authorRoss Zwisler <ross.zwisler@linux.intel.com>
Wed, 23 Mar 2016 03:33:40 +0000 (14:33 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 23 Mar 2016 03:33:40 +0000 (14:33 +1100)
commit1637c06780e9943864dc8c4a6af73d120bdf61ae
tree744626fef61904307e3d16e3d2bfedddd453c611
parent2451c334ef2211667cd26de91b57226869f1b91a
ext4: defrag not supported with DAX

As of this kernel commit:

commit 73f34a5e2ced ("ext4: online defrag not supported with DAX")

online defrag operations for ext4 are disallowed when the filesystem is
mounted with the DAX option.

This causes several xfstests to fail because they expect the defrag
operation to change the file layout:

ext4/308  [failed, exit status 1] - output mismatch (see /root/xfstests/results//ext4/308.out.bad)
    --- tests/ext4/308.out 2015-10-02 10:19:36.791795792 -0600
    +++ /root/xfstests/results//ext4/308.out.bad 2016-02-17 16:20:52.330454602 -0700
    @@ -23,659 +23,5 @@
     50f924a5dc9b03609a4577f9f961414b  SCRATCH_MNT/test.10
     Perform compacting
     50f924a5dc9b03609a4577f9f961414b  SCRATCH_MNT/test.10
    -Perform compacting, second pass
    -50f924a5dc9b03609a4577f9f961414b  SCRATCH_MNT/test.10
    -Create file with 20 * 2 fragments
    -wrote 1234/1234 bytes at offset 0
    ...
    (Run 'diff -u tests/ext4/308.out /root/xfstests/results//ext4/308.out.bad'  to see the entire diff)
generic/018 1s ... [failed, exit status 1] - output mismatch (see /root/xfstests/results//generic/018.out.bad)
    --- tests/generic/018.out 2016-02-17 16:02:40.103656140 -0700
    +++ /root/xfstests/results//generic/018.out.bad 2016-02-17 16:20:53.117459173 -0700
    @@ -10,10 +10,6 @@
     After: 1
     Write backwards sync, but contiguous - should defrag to 1 extent
     Before: in_range(5, 10)
    -After: 1
    -Write backwards sync leaving holes - defrag should do nothing
    -Before: 16
    -After: 16
    ...
    (Run 'diff -u tests/generic/018.out /root/xfstests/results//generic/018.out.bad'  to see the entire diff)

Avoid this by skipping over defrag tests if we are using ext4 + DAX.

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/defrag