Commit bfeb4f99 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'zonefs-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs

Pull zonefs fixes from Damien Le Moal:
 "Two fixes in here:

   - Revert the initial decision to silently ignore IOCB_NOWAIT for
     asynchronous direct IOs to sequential zone files. Instead, return
     an error to the user to signal that the feature is not supported
     (from Christoph)

   - A fix to zonefs Kconfig to select FS_IOMAP to avoid build failures
     if no other file system already selected this option (from
     Johannes)"

* tag 'zonefs-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs:
  zonefs: select FS_IOMAP
  zonefs: fix IOCB_NOWAIT handling
parents 45d0b75b 0dda2ddb
...@@ -2,6 +2,7 @@ config ZONEFS_FS ...@@ -2,6 +2,7 @@ config ZONEFS_FS
tristate "zonefs filesystem support" tristate "zonefs filesystem support"
depends on BLOCK depends on BLOCK
depends on BLK_DEV_ZONED depends on BLK_DEV_ZONED
select FS_IOMAP
help help
zonefs is a simple file system which exposes zones of a zoned block zonefs is a simple file system which exposes zones of a zoned block
device (e.g. host-managed or host-aware SMR disk drives) as files. device (e.g. host-managed or host-aware SMR disk drives) as files.
......
...@@ -601,13 +601,13 @@ static ssize_t zonefs_file_dio_write(struct kiocb *iocb, struct iov_iter *from) ...@@ -601,13 +601,13 @@ static ssize_t zonefs_file_dio_write(struct kiocb *iocb, struct iov_iter *from)
ssize_t ret; ssize_t ret;
/* /*
* For async direct IOs to sequential zone files, ignore IOCB_NOWAIT * For async direct IOs to sequential zone files, refuse IOCB_NOWAIT
* as this can cause write reordering (e.g. the first aio gets EAGAIN * as this can cause write reordering (e.g. the first aio gets EAGAIN
* on the inode lock but the second goes through but is now unaligned). * on the inode lock but the second goes through but is now unaligned).
*/ */
if (zi->i_ztype == ZONEFS_ZTYPE_SEQ && !is_sync_kiocb(iocb) if (zi->i_ztype == ZONEFS_ZTYPE_SEQ && !is_sync_kiocb(iocb) &&
&& (iocb->ki_flags & IOCB_NOWAIT)) (iocb->ki_flags & IOCB_NOWAIT))
iocb->ki_flags &= ~IOCB_NOWAIT; return -EOPNOTSUPP;
if (iocb->ki_flags & IOCB_NOWAIT) { if (iocb->ki_flags & IOCB_NOWAIT) {
if (!inode_trylock(inode)) if (!inode_trylock(inode))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment