Thread (17 messages) 17 messages, 3 authors, 2018-11-20

Re: [PATCH 5/5] aio: add support for file based polled IO

From: Christoph Hellwig <hch@infradead.org>
Date: 2018-11-19 18:35:00
Also in: linux-fsdevel

On Sat, Nov 17, 2018 at 04:53:17PM -0700, Jens Axboe wrote:
quoted hunk ↗ jump to hunk
Needs further work, but this should work fine on normal setups
with a file system on a pollable block device.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
 fs/aio.c       | 2 ++
 fs/direct-io.c | 4 +++-
 fs/iomap.c     | 7 +++++--
 3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/fs/aio.c b/fs/aio.c
index 500da3ffc376..e02085fe10d7 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1310,6 +1310,8 @@ static struct block_device *aio_bdev_host(struct kiocb *req)
 
 	if (S_ISBLK(inode->i_mode))
 		return I_BDEV(inode);
+	else if (inode->i_sb && inode->i_sb->s_bdev)
+		return inode->i_sb->s_bdev;
This is broken for multi-device filesystems, e.g. XFS with the RT
device, or btrfs.  See my patch in reply to your last one for an idea
how to solve this.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help