From: Keith Busch <kbusch@kernel.org>
To: Keith Busch <kbusch@meta.com>
Cc: hch@lst.de, sagi@grimberg.me, linux-nvme@lists.infradead.org
Subject: Re: [PATCH-part-2 9/9] nvme: force sgls on user passthrough if possible
Date: Wed, 4 Sep 2024 13:23:58 -0600 [thread overview]
Message-ID: <ZtizzqB9a7UBCs1M@kbusch-mbp> (raw)
In-Reply-To: <20240904183818.713941-10-kbusch@meta.com>
On Wed, Sep 04, 2024 at 11:38:17AM -0700, Keith Busch wrote:
> @@ -146,6 +156,13 @@ static int nvme_map_user_request(struct request *req, u64 ubuffer,
> if (bdev) {
> bio_set_dev(bio, bdev);
> if (meta_buffer && meta_len) {
> + if (nvme_ctrl_meta_sgl_supported(ctrl)) {
> + nvme_req(req)->flags |= NVME_REQ_USE_META_SGLS;
> + } else {
> + dev_warn_once(ctrl->device,
> + "using unchecked meta buffer\n");
> + add_taint(TAINT_USER, LOCKDEP_STILL_OK);
> + }
> ret = bio_integrity_map_user(bio, meta_buffer, meta_len,
> meta_seed);
> if (ret)
This actually needs to add this line on successful:
req->nr_integrity_segments = bio_integrity(bio)->bip_vcnt;
But it think it would be even better to introce a request helper,
blk_integrity_map_user() that takes a struct instead of a bio so it can
handle updating the request state appropriately.
next prev parent reply other threads:[~2024-09-04 19:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-04 18:38 [PATCH-part-2 0/9] nvme support for sgl mptr, safe passthrough Keith Busch
2024-09-04 18:38 ` [PATCH-part-2 1/9] nvme-pci: use sgl capable helper function Keith Busch
2024-09-04 18:38 ` [PATCH-part-2 2/9] nvme-pci: provide prp selection helper Keith Busch
2024-09-06 11:22 ` Anuj Gupta
2024-09-04 18:38 ` [PATCH-part-2 3/9] nvme-pci: split out the simple dma mapping Keith Busch
2024-09-04 18:38 ` [PATCH-part-2 4/9] nvme-pci: remove "dma_len" from nvme_iod Keith Busch
2024-09-04 18:38 ` [PATCH-part-2 5/9] nvme-pci: simplify io setup function parameters Keith Busch
2024-09-06 11:24 ` Anuj Gupta
2024-09-04 18:38 ` [PATCH-part-2 6/9] nvme-pci: common dma pool alloc helper Keith Busch
2024-09-04 18:38 ` [PATCH-part-2 7/9] nvme-pci: provide a sgl mapping helper Keith Busch
2024-09-04 18:38 ` [PATCH-part-2 8/9] nvme-pci: add support for sgl metadata Keith Busch
2024-09-04 19:22 ` Keith Busch
2024-09-04 18:38 ` [PATCH-part-2 9/9] nvme: force sgls on user passthrough if possible Keith Busch
2024-09-04 19:23 ` Keith Busch [this message]
2024-09-06 17:29 ` [PATCH-part-2 0/9] nvme support for sgl mptr, safe passthrough Keith Busch
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=ZtizzqB9a7UBCs1M@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=hch@lst.de \
--cc=kbusch@meta.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.