From: Jasper Surmont <surmontjasper@gmail.com>
To: linux-block@vger.kernel.org
Subject: Re: [Question] Accessing read data in bio request
Date: Mon, 18 Apr 2022 16:06:52 +0300 [thread overview]
Message-ID: <b975d3aa-e5b1-c16d-1820-4de5d84576cc@gmail.com> (raw)
In-Reply-To: <eab14c0a-dd66-555c-8830-d23a5068273c@kernel.dk>
Okay thanks! So does this mean that you would suggest doing it with
bvec_kmap_local()?
Or are there other, maybe better, methods?
Thanks!
On 18/04/2022 04:59, Jens Axboe wrote:
> On 4/14/22 8:15 AM, Jasper Surmont wrote:
>> I'm writing a device mapper target, and on a bio (read) request I want
>> to access (for example just logging) the data that was just read (by
>> providing a callback to bio->bio_end_io).
>>
>> I've figured out I could read the data by using bvec_kmap_local() on
>> each bio_vec to get a pointer to the data. However, if my
>> understanding is correct this seems like an unefficient way: if the
>> bio just finished a read then shouldn't the data already be mapped
>> somewhere? If so, where?
> Not necessarily - if you're doing passthrough or O_DIRECT IO, then
> no mapping necessarily exists for any part of the IO.
>
>
next prev parent reply other threads:[~2022-04-18 13:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-14 14:15 [Question] Accessing read data in bio request Jasper Surmont
2022-04-18 1:59 ` Jens Axboe
2022-04-18 13:06 ` Jasper Surmont [this message]
2022-04-18 15:33 ` 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=b975d3aa-e5b1-c16d-1820-4de5d84576cc@gmail.com \
--to=surmontjasper@gmail.com \
--cc=linux-block@vger.kernel.org \
/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