On Wed 05-02-20 14:15:58, Jeff Moyer wrote: > 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. > > Signed-off-by: Jeff Moyer <jmoyer@xxxxxxxxxx> The patch looks good to me. You can add: Reviewed-by: Jan Kara <jack@xxxxxxx> 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 > diff --git a/fs/dax.c b/fs/dax.c > index 1f1f0201cad1..0b0d8819cb1b 100644 > --- a/fs/dax.c > +++ b/fs/dax.c > @@ -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); > -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR