[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y8h62KsnI8g/xaRz@ZenIV>
Date: Wed, 18 Jan 2023 23:03:52 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: Christoph Hellwig <hch@...radead.org>
Cc: David Howells <dhowells@...hat.com>,
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,
Peter Zijlstra <peterz@...radead.org>,
David Hildenbrand <david@...hat.com>
Subject: Re: [PATCH v6 03/34] iov_iter: Pass I/O direction into
iov_iter_get_pages*()
On Mon, Jan 16, 2023 at 11:57:08PM -0800, Christoph Hellwig wrote:
> On Mon, Jan 16, 2023 at 11:08:24PM +0000, David Howells wrote:
> > Define FOLL_SOURCE_BUF and FOLL_DEST_BUF to indicate to get_user_pages*()
> > and iov_iter_get_pages*() how the buffer is intended to be used in an I/O
> > operation. Don't use READ and WRITE as a read I/O writes to memory and
> > vice versa - which causes confusion.
> >
> > The direction is checked against the iterator's data_source.
>
> Why can't we use the existing FOLL_WRITE?
I'm really not fond of passing FOLL_... stuff into iov_iter
primitives. That space contains things like FOLL_PIN, which makes
no sense whatsoever for non-user-backed iterators; having the
callers pass it in makes them automatically dependent upon the
iov_iter flavour.
Powered by blists - more mailing lists