From: Jens Axboe <axboe@kernel.dk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-fsdevel@vger.kernel.org, brauner@kernel.org,
viro@zeniv.linux.org.uk
Subject: Re: [PATCH 3/9] iov_iter: overlay struct iovec and ubuf/len
Date: Tue, 28 Mar 2023 18:38:25 -0600 [thread overview]
Message-ID: <43b27cfd-0d14-2182-9a6a-83f07ad832ae@kernel.dk> (raw)
In-Reply-To: <CAHk-=wi-mSanfxOGr4i4_TsYvxQVpzCWCsqdZr3LACHWfdVnhw@mail.gmail.com>
On 3/28/23 4:30?PM, Linus Torvalds wrote:
> thing
>
> On Tue, Mar 28, 2023 at 3:19?PM Jens Axboe <axboe@kernel.dk> wrote:
>>
>> Nobody should use it, though. The one case where I thought we'd use
>> it was iov_iter_iovec(), but that doesn't work...
>
> You only think that because all your conversions are bogus and wrong.
>
> Your latest "[PATCH 7/9] ALSA: pcm.. " patch is just wrong.
>
> Doing this:
>
> - if (!iter_is_iovec(from))
> + if (!from->user_backed)
>
> does not work AT ALL. You also need to switch all the uses of
> "from->iov" to use the "iter_iov()" helper (that you didn't use).
>
> Because "from->iov" is _only_ valid as a iov pointer for an ITER_IOV.
>
> For an ITER_UBUF, that will be the user pointer in the union, and to
> get the iov, you need to do that
>
> iov = &from->ubuf_iov
>
> thing.
>
> The "overlay ubuf as an iov" does *not* make "from->iov" work at all.
> Really. You still need to *generate* that pointer from the overlaid
> data.
>
> So your latest patches may build, but they most definitely won't work.
>
> I would in fact suggest renaming the "iov" member entirely, to make
> sure that nobody uses the "direct access" model ever.
Yeah ok, I see what you mean now. I'll rework it and post something
tomorrow when it looks sane.
--
Jens Axboe
next prev parent reply other threads:[~2023-03-29 0:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 21:58 [PATCHSET v5 0/9] Turn single segment imports into ITER_UBUF Jens Axboe
2023-03-28 21:58 ` [PATCH 1/9] block: ensure bio_alloc_map_data() deals with ITER_UBUF correctly Jens Axboe
2023-03-28 21:58 ` [PATCH 2/9] iov_iter: teach iov_iter_iovec() to deal with ITER_UBUF Jens Axboe
2023-03-28 21:58 ` [PATCH 3/9] iov_iter: overlay struct iovec and ubuf/len Jens Axboe
2023-03-28 22:16 ` Linus Torvalds
2023-03-28 22:19 ` Jens Axboe
2023-03-28 22:30 ` Linus Torvalds
2023-03-29 0:38 ` Jens Axboe [this message]
2023-03-28 21:58 ` [PATCH 4/9] iov_iter: set nr_segs = 1 for ITER_UBUF Jens Axboe
2023-03-28 21:58 ` [PATCH 5/9] IB/hfi1: check for user backed iterator, not specific iterator type Jens Axboe
2023-03-28 21:58 ` [PATCH 6/9] IB/qib: " Jens Axboe
2023-03-28 21:58 ` [PATCH 7/9] ALSA: pcm: " Jens Axboe
2023-03-28 21:58 ` [PATCH 8/9] iov_iter: convert import_single_range() to ITER_UBUF Jens Axboe
2023-03-28 21:58 ` [PATCH 9/9] iov_iter: import single vector iovecs as ITER_UBUF Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43b27cfd-0d14-2182-9a6a-83f07ad832ae@kernel.dk \
--to=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).