dax: pass NOWAIT flag to iomap_apply
PATCH 1/1 dax: pass NOWAIT flag to iomap_apply
fstests generic/471 reports a failure when run with MOUNT_OPTIONS="-o dax". The reason is that the initial pwrite to an empty file with the RWF_NOWAIT flag set does not return -EAGAIN. It turns out that dax_iomap_rw doesn't pass that flag through to iomap_apply.
With this patch applied, generic/471 passes for me.
fs/dax.c +3 -0
@@ -1207,6 +1207,9 @@ dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter,lockdep_assert_held (&inode->i_rwsem); } +if (iocb->ki_flags &IOCB_NOWAIT ) + flags |=IOMAP_NOWAIT ; +while (iov_iter_count (iter)) { ret =iomap_apply (inode, pos,iov_iter_count (iter), flags, ops, iter, dax_iomap_actor);
Quoted 8 lines · Jeff Moyer
fstests generic/471 reports a failure when run with MOUNT_OPTIONS="-o dax". The reason is that the initial pwrite to an empty file with the
RWF_NOWAITflag set does not return-EAGAIN. It turns out thatdax_iomap_rwdoesn't pass that flag through toiomap_apply.With this patch applied, generic/471 passes for me.
Signed-off-by Jeff Moyer <[email protected]>
Looks good,
Dan Williams
AppliedQuoted 7 lines · Christoph Hellwig
Quoted 5 lines · Jeff Moyer
fstests generic/471 reports a failure when run with MOUNT_OPTIONS="-o dax". The reason is that the initial pwrite to an empty file with the
RWF_NOWAITflag set does not return-EAGAIN. It turns out thatdax_iomap_rwdoesn't pass that flag through toiomap_apply.
Quoted 7 lines
Quoted 3 lines
With this patch applied, generic/471 passes for me.
Signed-off-by Jeff Moyer <[email protected]>Looks good,
Reviewed-by Christoph Hellwig <[email protected]>
Applied.
Quoted 8 lines · Jeff Moyer
fstests generic/471 reports a failure when run with MOUNT_OPTIONS="-o dax". The reason is that the initial pwrite to an empty file with the
RWF_NOWAITflag set does not return-EAGAIN. It turns out thatdax_iomap_rwdoesn't pass that flag through toiomap_apply.With this patch applied, generic/471 passes for me.
Signed-off-by Jeff Moyer <[email protected]>
The patch looks good to me. You can add:
BTW, I've just noticed ext4 seems to be buggy in this regard and even this patch doesn't fix it. So I guess you've been using XFS for testing this?
Honza
Quoted 15 lines
fs/dax.c +3
-0@@ -1207,6 +1207,9 @@ dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter,lockdep_assert_held (&inode->i_rwsem); } +if (iocb->ki_flags &IOCB_NOWAIT ) + flags |=IOMAP_NOWAIT ; +while (iov_iter_count (iter)) { ret =iomap_apply (inode, pos,iov_iter_count (iter), flags, ops, iter, dax_iomap_actor);
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Quoted 8 lines · Jan Kara
Quoted 7 lines · Jeff Moyer
fstests generic/471 reports a failure when run with MOUNT_OPTIONS="-o dax". The reason is that the initial pwrite to an empty file with the
RWF_NOWAITflag set does not return-EAGAIN. It turns out thatdax_iomap_rwdoesn't pass that flag through toiomap_apply.With this patch applied, generic/471 passes for me.
Quoted 8 lines
Quoted 1 line
Signed-off-by Jeff Moyer <[email protected]>The patch looks good to me. You can add:
Reviewed-by Jan Kara <[email protected]>BTW, I've just noticed ext4 seems to be buggy in this regard and even this patch doesn't fix it. So I guess you've been using XFS for testing this?
That's right, sorry I didn't mention that. Will you send a patch for ext4, or do you want me to look into it?
Thanks!
Jeff
Jan Kara
reviewerQuoted 14 lines · Jeff Moyer
Quoted 12 lines · Jan Kara
Quoted 8 lines · Jeff Moyer
fstests generic/471 reports a failure when run with MOUNT_OPTIONS="-o dax". The reason is that the initial pwrite to an empty file with the
RWF_NOWAITflag set does not return-EAGAIN. It turns out thatdax_iomap_rwdoesn't pass that flag through toiomap_apply.With this patch applied, generic/471 passes for me.
Signed-off-by Jeff Moyer <[email protected]>The patch looks good to me. You can add:
Quoted 7 lines
Quoted 4 lines
Reviewed-by Jan Kara <[email protected]>BTW, I've just noticed ext4 seems to be buggy in this regard and even this patch doesn't fix it. So I guess you've been using XFS for testing this?
That's right, sorry I didn't mention that. Will you send a patch for ext4, or do you want me to look into it?
I've taken down a note in todo list to eventually look into that but if you can have a look, I'm more than happy to remove that entry :).
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Quoted 17 lines · Jan Kara
Quoted 16 lines · Jeff Moyer
Quoted 14 lines · Jan Kara
Quoted 8 lines · Jeff Moyer
fstests generic/471 reports a failure when run with MOUNT_OPTIONS="-o dax". The reason is that the initial pwrite to an empty file with the
RWF_NOWAITflag set does not return-EAGAIN. It turns out thatdax_iomap_rwdoesn't pass that flag through toiomap_apply.With this patch applied, generic/471 passes for me.
Signed-off-by Jeff Moyer <[email protected]>The patch looks good to me. You can add:
Reviewed-by Jan Kara <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
BTW, I've just noticed ext4 seems to be buggy in this regard and even this patch doesn't fix it. So I guess you've been using XFS for testing this?
That's right, sorry I didn't mention that. Will you send a patch for ext4, or do you want me to look into it?
I've taken down a note in todo list to eventually look into that but if you can have a look, I'm more than happy to remove that entry :).
OK, I'll take a look.
-Jeff