From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:39388 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726720AbeKSSfA (ORCPT ); Mon, 19 Nov 2018 13:35:00 -0500 Date: Mon, 19 Nov 2018 00:12:07 -0800 From: Christoph Hellwig To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-aio@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 5/5] aio: add support for file based polled IO Message-ID: <20181119081207.GK9622@infradead.org> References: <20181117235317.7366-1-axboe@kernel.dk> <20181117235317.7366-6-axboe@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181117235317.7366-6-axboe@kernel.dk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Nov 17, 2018 at 04:53:17PM -0700, Jens Axboe wrote: > 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 > --- > 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.