[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <147887.1673535529@warthog.procyon.org.uk>
Date: Thu, 12 Jan 2023 14:58:49 +0000
From: David Howells <dhowells@...hat.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: dhowells@...hat.com, Al Viro <viro@...iv.linux.org.uk>,
Jens Axboe <axboe@...nel.dk>, Jan Kara <jack@...e.cz>,
Christoph Hellwig <hch@....de>,
Matthew Wilcox <willy@...radead.org>,
Logan Gunthorpe <logang@...tatee.com>,
linux-block@...r.kernel.org, Jeff Layton <jlayton@...nel.org>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 8/9] iov_iter, block: Make bio structs pin pages rather than ref'ing if appropriate
Christoph Hellwig <hch@...radead.org> wrote:
> But given that all calls for the same iter type return the same
> cleanup_mode by defintion I'm not even sure we need any of this
> debug checking, and might as well just do:
>
> if (cleanup_mode & FOLL_GET)
> bio_set_flag(bio, BIO_PAGE_REFFED);
> else if (cleanup_mode & FOLL_PIN)
> bio_set_flag(bio, BIO_PAGE_PINNED);
That's kind of what I'm doing - though I've left out the else just in case the
VM decides to indicate back both FOLL_GET and FOLL_PIN. I'm not sure why it
would but...
David
Powered by blists - more mailing lists