Skip to content

Commit 96222d5

Browse files
JeffMoyerdjbw
authored andcommitted
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. Signed-off-by: Jeff Moyer <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dan Williams <[email protected]>
1 parent f01b16a commit 96222d5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/dax.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,9 @@ dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter,
12011201
lockdep_assert_held(&inode->i_rwsem);
12021202
}
12031203

1204+
if (iocb->ki_flags & IOCB_NOWAIT)
1205+
flags |= IOMAP_NOWAIT;
1206+
12041207
while (iov_iter_count(iter)) {
12051208
ret = iomap_apply(inode, pos, iov_iter_count(iter), flags, ops,
12061209
iter, dax_iomap_actor);

0 commit comments

Comments
 (0)