History

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

Linus Torvalds committed 6 years ago

Commit bfeb4f92 parents 45d0b75 0dda2dd2 files · +5 −4Browse files

Unified · Split

2 files
  1. fs/zonefs/Kconfig +1 −0
  2. fs/zonefs/super.c +4 −4
fs/zonefs/Kconfig+1−0
@@ -2,6 +2,7 @@ config ZONEFS_FS · 1 unmodified line
2 tristate "zonefs filesystem support"2 tristate "zonefs filesystem support"
3 depends on BLOCK3 depends on BLOCK
4 depends on BLK_DEV_ZONED4 depends on BLK_DEV_ZONED
5 select FS_IOMAP
5 help6 help
6 zonefs is a simple file system which exposes zones of a zoned block7 zonefs is a simple file system which exposes zones of a zoned block
7 device (e.g. host-managed or host-aware SMR disk drives) as files.8 device (e.g. host-managed or host-aware SMR disk drives) as files.
fs/zonefs/super.c+4−4
@@ -601,13 +601,13 @@ static ssize_t zonefs_file_dio_write(struct kiocb *iocb, struct iov_iter *from) · 600 unmodified lines
601 ssize_t ret;601 ssize_t ret;
602 602
603 /*603 /*
604 * For async direct IOs to sequential zone files, ignore IOCB_NOWAIT604 * For async direct IOs to sequential zone files, refuse IOCB_NOWAIT
605 * as this can cause write reordering (e.g. the first aio gets EAGAIN605 * as this can cause write reordering (e.g. the first aio gets EAGAIN
606 * on the inode lock but the second goes through but is now unaligned).606 * on the inode lock but the second goes through but is now unaligned).
607 */607 */
608 if (zi->i_ztype == ZONEFS_ZTYPE_SEQ && !is_sync_kiocb(iocb)608 if (zi->i_ztype == ZONEFS_ZTYPE_SEQ && !is_sync_kiocb(iocb) &&
609 && (iocb->ki_flags & IOCB_NOWAIT))609 (iocb->ki_flags & IOCB_NOWAIT))
610 iocb->ki_flags &= ~IOCB_NOWAIT;610 return -EOPNOTSUPP;
611 611
612 if (iocb->ki_flags & IOCB_NOWAIT) {612 if (iocb->ki_flags & IOCB_NOWAIT) {
613 if (!inode_trylock(inode))613 if (!inode_trylock(inode))