From: Anuj gupta <anuj1072538@gmail.com>
To: Keith Busch <kbusch@kernel.org>
Cc: Anuj Gupta <anuj20.g@samsung.com>,
axboe@kernel.dk, hch@lst.de, linux-nvme@lists.infradead.org,
linux-block@vger.kernel.org, martin.petersen@oracle.com,
Kanchan Joshi <joshi.k@samsung.com>
Subject: Re: [PATCH] block: unmap and free user mapped integrity via submitter
Date: Sat, 11 May 2024 16:52:23 +0530 [thread overview]
Message-ID: <CACzX3Av9JUPLeR5j++yvctgES4UP7M17PQZh37ByZyBP6BemTw@mail.gmail.com> (raw)
In-Reply-To: <Zj5t9TwrT77KGOyr@kbusch-mbp.dhcp.thefacebook.com>
On Sat, May 11, 2024 at 12:31 AM Keith Busch <kbusch@kernel.org> wrote:
>
> On Fri, May 10, 2024 at 03:14:29PM +0530, Anuj Gupta wrote:
> > The user mapped intergity is copied back and unpinned by
> > bio_integrity_free which is a low-level routine. Do it via the submitter
> > rather than doing it in the low-level block layer code, to split the
> > submitter side from the consumer side of the bio.
>
> Thanks, this looks pretty good.
>
> > out_unmap:
> > - if (bio)
> > + if (bio) {
> > + if (bio_integrity(bio))
> > + bio_integrity_unmap_free_user(bio);
> > blk_rq_unmap_user(bio);
> > + }
>
> Since we're adding more cleanup responsibilities on the caller, and this
> pattern is repeated 4 times, I think a little helper function is
> warranted: 'nvme_unmap_bio(struct bio *bio)', or something like that.
Makes sense, I will add this in the next version.
Thanks,
Anuj Gupta
prev parent reply other threads:[~2024-05-11 11:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240510095142epcas5p4fde65328020139931417f83ccedbce90@epcas5p4.samsung.com>
2024-05-10 9:44 ` [PATCH] block: unmap and free user mapped integrity via submitter Anuj Gupta
2024-05-10 13:45 ` Jens Axboe
2024-05-10 18:42 ` Anuj gupta
2024-05-10 18:56 ` Keith Busch
2024-05-11 11:22 ` Anuj gupta [this message]
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=CACzX3Av9JUPLeR5j++yvctgES4UP7M17PQZh37ByZyBP6BemTw@mail.gmail.com \
--to=anuj1072538@gmail.com \
--cc=anuj20.g@samsung.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=joshi.k@samsung.com \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=martin.petersen@oracle.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).