[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cfe9e6d6-dd1c-a500-b3b0-a92d0b66c3c0@kernel.dk>
Date: Fri, 10 Sep 2021 11:32:24 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Al Viro <viro@...iv.linux.org.uk>,
Pavel Begunkov <asml.silence@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [git pull] iov_iter fixes
On 9/10/21 11:31 AM, Linus Torvalds wrote:
> On Fri, Sep 10, 2021 at 10:26 AM Jens Axboe <axboe@...nel.dk> wrote:
>>
>> On 9/10/21 10:58 AM, Linus Torvalds wrote:
>>> On Fri, Sep 10, 2021 at 9:56 AM Al Viro <viro@...iv.linux.org.uk> wrote:
>>>>
>>>> What's the point of all those contortions, anyway? You only need it for
>>>> iovec case; don't mix doing that and turning it into flavour-independent
>>>> primitive.
>>>
>>> Good point, making it specific to iovec only gets rid of a lot of
>>> special cases and worries.
>>>
>>> This is fairly specialized, no need to always cater to every possible case.
>>
>> Alright, split into three patches:
>>
>> https://git.kernel.dk/cgit/linux-block/log/?h=iov_iter
>
> That looks sane to me.
>
> Please add some comment about how that
>
> i->iov -= state->nr_segs - i->nr_segs;
>
> actually is the right thing for all the three cases (iow how 'iov',
> 'kvec' and 'bvec' all end up having a union member that acts the same
> way).
Good idea, I'll add that right now.
> But yeah, I like how the io_uring.c code looks better this way too.
Me too :-)
--
Jens Axboe
Powered by blists - more mailing lists