Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1282257 > unrolled thread
| Started by | Ross Zwisler <ross.zwisler@linux.intel.com> |
|---|---|
| First post | 2015-12-02 19:40 +0100 |
| Last post | 2015-12-11 05:30 +0100 |
| Articles | 8 — 3 participants |
Back to article view | Back to linux.kernel
xfstests failures with xfs, dax and v4.4-rc3 Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-02 19:40 +0100
Re: xfstests failures with xfs, dax and v4.4-rc3 Dan Williams <dan.j.williams@gmail.com> - 2015-12-02 21:20 +0100
Re: xfstests failures with xfs, dax and v4.4-rc3 Dave Chinner <david@fromorbit.com> - 2015-12-02 21:30 +0100
Re: xfstests failures with xfs, dax and v4.4-rc3 Dave Chinner <david@fromorbit.com> - 2015-12-02 21:50 +0100
Re: xfstests failures with xfs, dax and v4.4-rc3 Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-02 22:40 +0100
Re: xfstests failures with xfs, dax and v4.4-rc3 Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-10 18:00 +0100
Re: xfstests failures with xfs, dax and v4.4-rc3 Dave Chinner <david@fromorbit.com> - 2015-12-10 23:40 +0100
Re: xfstests failures with xfs, dax and v4.4-rc3 Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-11 05:30 +0100
| From | Ross Zwisler <ross.zwisler@linux.intel.com> |
|---|---|
| Date | 2015-12-02 19:40 +0100 |
| Subject | xfstests failures with xfs, dax and v4.4-rc3 |
| Message-ID | <qBktP-2ty-5@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
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
[toc] | [next] | [standalone]
| From | Dan Williams <dan.j.williams@gmail.com> |
|---|---|
| Date | 2015-12-02 21:20 +0100 |
| Message-ID | <qBm2C-3zv-9@gated-at.bofh.it> |
| In reply to | #1282257 |
On Wed, Dec 2, 2015 at 10:34 AM, Ross Zwisler <ross.zwisler@linux.intel.com> wrote: > 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? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Dave Chinner <david@fromorbit.com> |
|---|---|
| Date | 2015-12-02 21:30 +0100 |
| Message-ID | <qBmci-3CV-15@gated-at.bofh.it> |
| In reply to | #1282257 |
On Wed, Dec 02, 2015 at 11:34:38AM -0700, Ross Zwisler wrote:
> 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.
--
Dave Chinner
david@fromorbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Dave Chinner <david@fromorbit.com> |
|---|---|
| Date | 2015-12-02 21:50 +0100 |
| Message-ID | <qBmvD-3Jz-3@gated-at.bofh.it> |
| In reply to | #1282352 |
On Thu, Dec 03, 2015 at 07:29:10AM +1100, Dave Chinner wrote:
> On Wed, Dec 02, 2015 at 11:34:38AM -0700, Ross Zwisler wrote:
> > 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.
Patch to fix the problem below.
-Dave.
--
Dave Chinner
david@fromorbit.com
xfs: Don't use reserved blocks for data blocks with DAX
From: Dave Chinner <dchinner@redhat.com>
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 <dchinner@redhat.com>
---
fs/xfs/xfs_iomap.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index f4f5b43..9ed146b 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Ross Zwisler <ross.zwisler@linux.intel.com> |
|---|---|
| Date | 2015-12-02 22:40 +0100 |
| Message-ID | <qBni3-4hS-45@gated-at.bofh.it> |
| In reply to | #1282360 |
On Thu, Dec 03, 2015 at 07:45:02AM +1100, Dave Chinner wrote:
> On Thu, Dec 03, 2015 at 07:29:10AM +1100, Dave Chinner wrote:
> > On Wed, Dec 02, 2015 at 11:34:38AM -0700, Ross Zwisler wrote:
> > > 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.
>
> Patch to fix the problem below.
>
> -Dave.
> --
> Dave Chinner
> david@fromorbit.com
>
> xfs: Don't use reserved blocks for data blocks with DAX
>
> From: Dave Chinner <dchinner@redhat.com>
>
> 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 <dchinner@redhat.com>
Tested-by: Ross Zwisler <ross.zwisler@linux.intel.com>
I've verified that this fixes all three failing xfstests reported in this mail.
Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Ross Zwisler <ross.zwisler@linux.intel.com> |
|---|---|
| Date | 2015-12-10 18:00 +0100 |
| Message-ID | <qEcJs-k8-19@gated-at.bofh.it> |
| In reply to | #1282449 |
On Wed, Dec 02, 2015 at 02:39:32PM -0700, Ross Zwisler wrote:
> On Thu, Dec 03, 2015 at 07:45:02AM +1100, Dave Chinner wrote:
> > On Thu, Dec 03, 2015 at 07:29:10AM +1100, Dave Chinner wrote:
> > > On Wed, Dec 02, 2015 at 11:34:38AM -0700, Ross Zwisler wrote:
> > > > 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.
> >
> > Patch to fix the problem below.
> >
> > -Dave.
> > --
> > Dave Chinner
> > david@fromorbit.com
> >
> > xfs: Don't use reserved blocks for data blocks with DAX
> >
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > 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 <dchinner@redhat.com>
>
> Tested-by: Ross Zwisler <ross.zwisler@linux.intel.com>
>
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Dave Chinner <david@fromorbit.com> |
|---|---|
| Date | 2015-12-10 23:40 +0100 |
| Message-ID | <qEi2t-3U5-3@gated-at.bofh.it> |
| In reply to | #1288674 |
On Thu, Dec 10, 2015 at 09:54:58AM -0700, Ross Zwisler wrote:
> On Wed, Dec 02, 2015 at 02:39:32PM -0700, Ross Zwisler wrote:
> > On Thu, Dec 03, 2015 at 07:45:02AM +1100, Dave Chinner wrote:
> > > On Thu, Dec 03, 2015 at 07:29:10AM +1100, Dave Chinner wrote:
> > > > On Wed, Dec 02, 2015 at 11:34:38AM -0700, Ross Zwisler wrote:
> > > > > 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.
> > >
> > > Patch to fix the problem below.
> > >
> > > -Dave.
> > > --
> > > Dave Chinner
> > > david@fromorbit.com
> > >
> > > xfs: Don't use reserved blocks for data blocks with DAX
> > >
> > > From: Dave Chinner <dchinner@redhat.com>
> > >
> > > 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 <dchinner@redhat.com>
> >
> > Tested-by: Ross Zwisler <ross.zwisler@linux.intel.com>
> >
> > 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.
--
Dave Chinner
david@fromorbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Ross Zwisler <ross.zwisler@linux.intel.com> |
|---|---|
| Date | 2015-12-11 05:30 +0100 |
| Message-ID | <qEnvb-7AG-3@gated-at.bofh.it> |
| In reply to | #1288976 |
On Fri, Dec 11, 2015 at 09:33:33AM +1100, Dave Chinner wrote: > On Thu, Dec 10, 2015 at 09:54:58AM -0700, Ross Zwisler wrote: > > On Wed, Dec 02, 2015 at 02:39:32PM -0700, Ross Zwisler wrote: > > > 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.... 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web