[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <65441.1666976522@warthog.procyon.org.uk>
Date: Fri, 28 Oct 2022 18:02:02 +0100
From: David Howells <dhowells@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: dhowells@...hat.com, Al Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@...radead.org>, willy@...radead.org,
dchinner@...hat.com, Steve French <smfrench@...il.com>,
Shyam Prasad N <nspmangalore@...il.com>,
Rohith Surabattula <rohiths.msft@...il.com>,
Jeff Layton <jlayton@...nel.org>,
Ira Weiny <ira.weiny@...el.com>, linux-cifs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 12/12] use less confusing names for iov_iter direction initializers
Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> Honestly, I think the *real* fix would be a type-based one. Don't do
>
> iov_iter_kvec(&iter, ITER_DEST, ...
>
> at all, but instead have two different kinds of 'struct iov_iter': one
> as a destination (iov_iter_dst), and one as a source (iov_iter_src),
Or maybe something along the lines of iov_iter_into_kvec() and
iov_iter_from_kvec()?
Also, would it make sense to disallow asking the iterator for its direction
entirely and only use it for internal sanity checking? In many of the places
it is looked at, the information is also available in another form (the
IOCB_WRITE flag, for example).
David
Powered by blists - more mailing lists