[lkml]   [2022]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 12/12] use less confusing names for iov_iter direction initializers
Linus Torvalds <> 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

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).


 \ /
  Last update: 2022-10-28 19:06    [W:0.146 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site