xfstests failures with xfs, dax and v4.4-rc3
Subsystems (2)
I'm hitting a few more test failures in my testing setup with v4.4-rc3, xfs and DAX. My test setup is a pair of 4GiB PMEM partitions in a KVM virtual machine. Here are the failures:
# ./check generic/256 generic/274 xfs/041 FSTYP -- xfs (debug) PLATFORM -- Linux/x86_64 alara 4.4.0-rc3 MKFS_OPTIONS -- -f -bsize=4096 /dev/pmem0p2 MOUNT_OPTIONS -- -o dax -o context=system_u:object_r:nfs_t:s0 /dev/pmem0p2 /mnt/xfstests_scratch
generic/256 43s ... - output mismatch (see /root/xfstests/results//generic/256.out.bad)
--- tests/generic/256.out 2015-10-02 10:19:36.807795900 -0600
+++ /root/xfstests/results//generic/256.out.bad 2015-12-02 11:22:34.838845475 -0700
@@ -1 +1,500 @@
QA output created by 256
+fallocate: No space left on device
+fallocate: No space left on device
+fallocate: No space left on device
+fallocate: No space left on device
+fallocate: No space left on device
+fallocate: No space left on device
...
(Run 'diff -u tests/generic/256.out /root/xfstests/results//generic/256.out.bad' to see the entire diff)
generic/274 7s ... [failed, exit status 1] - output mismatch (see /root/xfstests/results//generic/274.out.bad)
--- tests/generic/274.out 2015-10-02 10:19:36.808795907 -0600
+++ /root/xfstests/results//generic/274.out.bad 2015-12-02 11:22:37.656868990 -0700
@@ -2,4 +2,5 @@
------------------------------
preallocation test
------------------------------
-done
+failed to write to test file
+(see /root/xfstests/results//generic/274.full for details)
...
(Run 'diff -u tests/generic/274.out /root/xfstests/results//generic/274.out.bad' to see the entire diff)xfs/041 14s ... [failed, exit status 1] - output mismatch (see /root/xfstests/results//xfs/041.out.bad)
--- tests/xfs/041.out 2015-10-02 10:19:36.818795975 -0600
+++ /root/xfstests/results//xfs/041.out.bad 2015-12-02 11:22:42.553909854 -0700
@@ -4,16 +4,5 @@
Grow filesystem to 33m... done
Flush filesystem... done
Check files... done
-Fill filesystem... done
-Grow filesystem to 67m... done
-Flush filesystem... done
-Check files... done
...
(Run 'diff -u tests/xfs/041.out /root/xfstests/results//xfs/041.out.bad' to see the entire diff)
Ran: generic/256 generic/274 xfs/041
Failures: generic/256 generic/274 xfs/041
Failed 3 of 3 tests
The .bad files are attached to this mail.
These three tests pass 100% of the time with and without DAX using v4.3, pass 100% of the time with v4.4-rc3 without DAX, and fail 100% of the time with v4.4-rc3 with DAX enabled.
I did try doubling the size of my ramdisk partition to see if that made any difference, and the failure was still present.
I'm using xfsprogs v4.3.0.
Please let me know if you have any other questions about how to reproduce the failure. I'm also happy to test patches.
Thanks,
- Ross
QA output created by 041
Make 32 megabyte filesystem on SCRATCH_DEV and mount... done
Fill filesystem... done
Grow filesystem to 33m... done
Flush filesystem... done
Check files... done
Fill filesystem... fail
src/fill2fs --verbose --dir=/mnt/xfstests_scratch/fill_67 --seed=0 --filesize=65536 --stddev=32768 --list=- >>/tmp/32491.manifest failed (returned 1): see /root/xfstests/results//xfs/041.full
QA output created by 256
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
fallocate: No space left on device
QA output created by 274
------------------------------
preallocation test
------------------------------
failed to write to test file
(see /root/xfstests/results//generic/274.full for details)
Quoted 3 lines · Ross Zwisler
I'm hitting a few more test failures in my testing setup with v4.4-rc3, xfs and DAX. My test setup is a pair of 4GiB PMEM partitions in a KVM virtual machine. Here are the failures:
...
Quoted 12 lines
generic/274 7s ... [failed, exit status 1] - output mismatch (see
/root/xfstests/results//generic/274.out.bad)--- tests/generic/274.out 2015-10-02 10:19:36.808795907 -0600 +++ /root/xfstests/results//generic/274.out.bad 2015-12-02 11:22:37.656868990 -0700 @@ -2,4 +2,5 @@ ------------------------------ preallocation test ------------------------------ -done +failed to write to test file +(see /root/xfstests/results//generic/274.full for details) ... (Run 'diff -u tests/generic/274.out /root/xfstests/results//generic/274.out.bad' to see the entire diff)
I looked at this one a bit last night, and talked to Dave about it; its' different handling with DAX w.r.t. preallocation; we go down a path which actually tries to re-reserve the disk blocks it'll be writing to, even though they're already allocated.
If the disk isn't full, I guess it doesn't matter, but this test explicitly tests ENOSPC.
Working on better understanding this path to see if I can fix it (unless Dave beats me to it ...)
-Eric
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 4 lines · Ross Zwisler
I'm hitting a few more test failures in my testing setup with v4.4-rc3, xfs and DAX. My test setup is a pair of 4GiB PMEM partitions in a KVM virtual machine. Here are the failures:
Is this a passing test with a v4.3 baseline? git bisect?
Quoted 3 lines · Ross Zwisler
I'm hitting a few more test failures in my testing setup with v4.4-rc3, xfs and DAX. My test setup is a pair of 4GiB PMEM partitions in a KVM virtual machine. Here are the failures:
Which are caused by commit 1ca1915 ("xfs: Don't use unwritten extents for DAX") because of this code for unwritten extent conversion in get_blocks:
tp->t_flags |= XFS_TRANS_RESERVE;
It's a minor problem compared to all the other issues DAX has right now, so I ignored it to get the bigger problem solved first.
Cheers,
Dave.
Signature · 2 lines
Dave Chinner [email protected]
Quoted 5 lines · Dave Chinner
Quoted 3 lines · Ross Zwisler
I'm hitting a few more test failures in my testing setup with v4.4-rc3, xfs and DAX. My test setup is a pair of 4GiB PMEM partitions in a KVM virtual machine. Here are the failures:
Quoted 8 lines
Which are caused by commit 1ca1915 ("xfs: Don't use unwritten extents for DAX") because of this code for unwritten extent conversion in
get_blocks:tp->t_flags |= XFS_TRANS_RESERVE;It's a minor problem compared to all the other issues DAX has right now, so I ignored it to get the bigger problem solved first.
Patch to fix the problem below.
-Dave.
Signature · 24 lines
Dave Chinner [email protected] xfs: Don't use reserved blocks for data blocks with DAX From: Dave Chinner <[email protected]> Commit 1ca1915 ("xfs: Don't use unwritten extents for DAX") enabled the DAX allocation call to dip into the reserve pool in case it was converting unwritten extents rather than allocating blocks. This was a direct copy of the unwritten extent conversion code, but had an unintended side effect of allowing normal data block allocation to use the reserve pool. Hence normal block allocation could deplete the reserve pool and prevent unwritten extent conversion at ENOSPC, hence violating fallocate guarantees on preallocated space. Fix it by checking whether the incoming map from __xfs_get_blocks() spans an unwritten extent and only use the reserve pool if the allocation covers an unwritten extent. Signed-off-by: Dave Chinner <[email protected]> --- fs/xfs/xfs_iomap.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
fs/xfs/xfs_iomap.c +8 -3
@@ -203,15 +203,20 @@ xfs_iomap_write_direct(* this outside the transaction context, but if we commit and then crash * we may not have zeroed the blocks and this will be exposed on * recovery of the allocation. Hence we must zero before commit. +* * Further, if we are mapping unwritten extents here, we need to zero * and convert them to written so that we don't need an unwritten extent * callback for DAX. This also means that we need to be able to dip into -* the reserve block pool if there is no space left but we need to do -* unwritten extent conversion. +* the reserve block pool for bmbt block allocation if there is no space +* left but we need to do unwritten extent conversion. */ +if (IS_DAX (VFS_I (ip))) { bmapi_flags =XFS_BMAPI_CONVERT |XFS_BMAPI_ZERO ; - tp->t_flags |=XFS_TRANS_RESERVE ; +if (ISUNWRITTEN (imap)) { + tp->t_flags |=XFS_TRANS_RESERVE ; + resblks =XFS_DIOSTRAT_SPACE_RES (mp,0 ) <<1 ; + } } error =xfs_trans_reserve (tp, &M_RES (mp)->tr_write, resblks, resrtextents);
Ross Zwisler
Tested-byQuoted 10 lines · Dave Chinner
Quoted 9 lines · Dave Chinner
Quoted 3 lines · Ross Zwisler
I'm hitting a few more test failures in my testing setup with v4.4-rc3, xfs and DAX. My test setup is a pair of 4GiB PMEM partitions in a KVM virtual machine. Here are the failures:
Which are caused by commit 1ca1915 ("xfs: Don't use unwritten extents for DAX") because of this code for unwritten extent conversion in
get_blocks:
Quoted 30 lines
Quoted 4 lines
tp->t_flags |= XFS_TRANS_RESERVE;It's a minor problem compared to all the other issues DAX has right now, so I ignored it to get the bigger problem solved first.
Patch to fix the problem below.
-Dave.
Signature · 21 lines
Dave Chinner [email protected] xfs: Don't use reserved blocks for data blocks with DAX From: Dave Chinner <[email protected]> Commit 1ca1915 ("xfs: Don't use unwritten extents for DAX") enabled the DAX allocation call to dip into the reserve pool in case it was converting unwritten extents rather than allocating blocks. This was a direct copy of the unwritten extent conversion code, but had an unintended side effect of allowing normal data block allocation to use the reserve pool. Hence normal block allocation could deplete the reserve pool and prevent unwritten extent conversion at ENOSPC, hence violating fallocate guarantees on preallocated space. Fix it by checking whether the incoming map from __xfs_get_blocks() spans an unwritten extent and only use the reserve pool if the allocation covers an unwritten extent. Signed-off-by: Dave Chinner <[email protected]>
I've verified that this fixes all three failing xfstests reported in this mail. Thanks!
Quoted 40 lines · Ross Zwisler
Quoted 39 lines · Dave Chinner
Quoted 5 lines · Dave Chinner
Quoted 3 lines · Ross Zwisler
I'm hitting a few more test failures in my testing setup with v4.4-rc3, xfs and DAX. My test setup is a pair of 4GiB PMEM partitions in a KVM virtual machine. Here are the failures:
Quoted 8 lines
Which are caused by commit 1ca1915 ("xfs: Don't use unwritten extents for DAX") because of this code for unwritten extent conversion in
get_blocks:tp->t_flags |= XFS_TRANS_RESERVE;It's a minor problem compared to all the other issues DAX has right now, so I ignored it to get the bigger problem solved first.
Patch to fix the problem below.
-Dave.
Signature · 19 lines
Dave Chinner [email protected] xfs: Don't use reserved blocks for data blocks with DAX From: Dave Chinner <[email protected]> Commit 1ca1915 ("xfs: Don't use unwritten extents for DAX") enabled the DAX allocation call to dip into the reserve pool in case it was converting unwritten extents rather than allocating blocks. This was a direct copy of the unwritten extent conversion code, but had an unintended side effect of allowing normal data block allocation to use the reserve pool. Hence normal block allocation could deplete the reserve pool and prevent unwritten extent conversion at ENOSPC, hence violating fallocate guarantees on preallocated space. Fix it by checking whether the incoming map from __xfs_get_blocks() spans an unwritten extent and only use the reserve pool if the allocation covers an unwritten extent.
Quoted 6 lines
Quoted 1 line
Signed-off-by Dave Chinner <[email protected]>Tested-by Ross Zwisler <[email protected]>I've verified that this fixes all three failing xfstests reported in this mail. Thanks!
Hey Dave,
Are you planning on pushing this fix for v4.4?
- Ross
Quoted 43 lines · Ross Zwisler
Quoted 42 lines · Ross Zwisler
Quoted 40 lines · Dave Chinner
Quoted 5 lines · Dave Chinner
Quoted 3 lines · Ross Zwisler
I'm hitting a few more test failures in my testing setup with v4.4-rc3, xfs and DAX. My test setup is a pair of 4GiB PMEM partitions in a KVM virtual machine. Here are the failures:
Quoted 8 lines
Which are caused by commit 1ca1915 ("xfs: Don't use unwritten extents for DAX") because of this code for unwritten extent conversion in
get_blocks:tp->t_flags |= XFS_TRANS_RESERVE;It's a minor problem compared to all the other issues DAX has right now, so I ignored it to get the bigger problem solved first.
Patch to fix the problem below.
-Dave.
Signature · 21 lines
Dave Chinner [email protected] xfs: Don't use reserved blocks for data blocks with DAX From: Dave Chinner <[email protected]> Commit 1ca1915 ("xfs: Don't use unwritten extents for DAX") enabled the DAX allocation call to dip into the reserve pool in case it was converting unwritten extents rather than allocating blocks. This was a direct copy of the unwritten extent conversion code, but had an unintended side effect of allowing normal data block allocation to use the reserve pool. Hence normal block allocation could deplete the reserve pool and prevent unwritten extent conversion at ENOSPC, hence violating fallocate guarantees on preallocated space. Fix it by checking whether the incoming map from __xfs_get_blocks() spans an unwritten extent and only use the reserve pool if the allocation covers an unwritten extent. Signed-off-by: Dave Chinner <[email protected]>
Quoted 8 lines
Quoted 4 lines
Tested-by Ross Zwisler <[email protected]>I've verified that this fixes all three failing xfstests reported in this mail. Thanks!
Hey Dave,
Are you planning on pushing this fix for v4.4?
No plans to right now - ENOSPC is a corner case that most users won't be anywhere near, especially for experimental functionality on hardware nobody actually has....
Cheers,
Dave.
Signature · 2 lines
Dave Chinner [email protected]
Quoted 5 lines · Dave Chinner
Quoted 4 lines · Ross Zwisler
Quoted 2 lines · Ross Zwisler
I've verified that this fixes all three failing xfstests reported in this mail. Thanks!
Quoted 7 lines
Quoted 3 lines
Hey Dave,
Are you planning on pushing this fix for v4.4?
No plans to right now - ENOSPC is a corner case that most users won't be anywhere near, especially for experimental functionality on hardware nobody actually has....
Really? I realize that it may be a case that most users won't actually hit, but it is a 5 line change that fixes four xfstests regressions between v4.3 and v4.4 for my DAX testing...
Is there a strong reason *not* to push it in the v4.4 cycle? I'm trying to clear up all xfstests differences between DAX and non-DAX, and this would help quite a bit.
Quoted 14 lines · Ross Zwisler
Quoted 5 lines · Dave Chinner
Quoted 4 lines · Ross Zwisler
Quoted 2 lines · Ross Zwisler
I've verified that this fixes all three failing xfstests reported in this mail. Thanks!
Quoted 7 lines
Quoted 3 lines
Hey Dave,
Are you planning on pushing this fix for v4.4?
No plans to right now - ENOSPC is a corner case that most users won't be anywhere near, especially for experimental functionality on hardware nobody actually has....
Quoted 7 lines
Really? I realize that it may be a case that most users won't actually hit, but it is a 5 line change that fixes four xfstests regressions between v4.3 and v4.4 for my DAX testing...
Is there a strong reason *not* to push it in the v4.4 cycle? I'm trying to clear up all xfstests differences between DAX and non-DAX, and this would help quite a bit.
Against my better judgement, I committed a largely untested, fundamental change to allocation policy for DAX-on-XFS *inside the 4.4 merge window* justifying it as "it's experimental code" and that "we needed to get it out there". IOWs, I've already stretched the rules and committed stuff I knew wasn't ready or worked 100% correctly just to keep you guys happy, but I'm not going to continue to do so. I'm reverting to usual policy of "soak in for-next, use "cc: stable" tags to get it backported when upstreamed in the next merge window.
Indeed, from my point of view it's pretty clear that lots of recent DAX code has been committed prematurely and without sufficient review and/or testing. This has lead to having to revert chunks of code and completely rework algorithms, I really don't care if you're being pushed to "make DAX shit happen fast" - my only concern here is *don't screw up production filesystems*.
Hence when it comes to making fundamental changes to allocation behaviour, I've already bent the policy/rules as far as I'm willing to. Changes in this area carry an inherent risk of breaking stuff unrelated to DAX and that is far more important right now than whether DAX (and experimental feature) works correctly or not.
Cheers,
Dave.
Signature · 2 lines
Dave Chinner [email protected]