[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eb1f8849-f0d8-9d3d-d80d-7fe8487a15f4@nvidia.com>
Date: Mon, 23 Jan 2023 18:42:28 -0800
From: John Hubbard <jhubbard@...dia.com>
To: David Howells <dhowells@...hat.com>,
Al Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@...radead.org>
CC: Matthew Wilcox <willy@...radead.org>, Jens Axboe <axboe@...nel.dk>,
"Jan Kara" <jack@...e.cz>, Jeff Layton <jlayton@...nel.org>,
Logan Gunthorpe <logang@...tatee.com>,
<linux-fsdevel@...r.kernel.org>, <linux-block@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, "Christoph Hellwig" <hch@....de>
Subject: Re: [PATCH v8 04/10] iomap: don't get an reference on ZERO_PAGE for
direct I/O block zeroing
On 1/23/23 09:30, David Howells wrote:
> From: Christoph Hellwig <hch@....de>
>
> ZERO_PAGE can't go away, no need to hold an extra reference.
That statement is true, but...
>
> Signed-off-by: Christoph Hellwig <hch@....de>
> Signed-off-by: David Howells <dhowells@...hat.com>
> ---
> fs/iomap/direct-io.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
> index 9804714b1751..47db4ead1e74 100644
> --- a/fs/iomap/direct-io.c
> +++ b/fs/iomap/direct-io.c
> @@ -202,7 +202,7 @@ static void iomap_dio_zero(const struct iomap_iter *iter, struct iomap_dio *dio,
> bio->bi_private = dio;
> bio->bi_end_io = iomap_dio_bio_end_io;
>
> - get_page(page);
> + bio_set_flag(bio, BIO_NO_PAGE_REF);
...is it accurate to assume that the entire bio is pointing to the zero
page? I recall working through this area earlier last year, and ended up
just letting the zero page get pinned, and then unpinning upon release,
which is harmless.
I like your approach, if it is possible. I'm just not sure that it's
correct given that bio's can have more than one page.
thanks,
--
John Hubbard
NVIDIA
Powered by blists - more mailing lists