From: Keith Busch <kbusch@kernel.org>
To: Puranjay Mohan <pjy@amazon.com>
Cc: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
Sagi Grimberg <sagi@grimberg.me>,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
puranjay@kernel.org
Subject: Re: [PATCH v2] nvme: check if the namespace supports metadata in nvme_map_user_request()
Date: Wed, 28 Aug 2024 08:44:59 -0600 [thread overview]
Message-ID: <Zs8360kRPGa1B5xy@kbusch-mbp> (raw)
In-Reply-To: <20240827132327.1704-1-pjy@amazon.com>
On Tue, Aug 27, 2024 at 01:23:27PM +0000, Puranjay Mohan wrote:
> @@ -119,9 +120,13 @@ static int nvme_map_user_request(struct request *req, u64 ubuffer,
> struct request_queue *q = req->q;
> struct nvme_ns *ns = q->queuedata;
> struct block_device *bdev = ns ? ns->disk->part0 : NULL;
> + bool has_metadata = bdev && meta_buffer && meta_len;
If this is an admin command, then bdev is NULL, so "has_metadata" is
false.
> struct bio *bio = NULL;
> int ret;
>
> + if (has_metadata && !blk_get_integrity(bdev->bd_disk))
> + return -EINVAL;
> +
Since has_metadata is false, we continue on to process this admin
command, but ignore the user's metadata settings. Do we want to return
error there too?
next prev parent reply other threads:[~2024-08-28 14:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240828095322epcas5p134935f60a199bc085198b06871cd33ba@epcas5p1.samsung.com>
2024-08-27 13:23 ` [PATCH v2] nvme: check if the namespace supports metadata in nvme_map_user_request() Puranjay Mohan
2024-08-28 4:28 ` Christoph Hellwig
2024-08-28 7:21 ` Sagi Grimberg
2024-08-28 9:45 ` Anuj Gupta
2024-08-28 14:44 ` Keith Busch [this message]
2024-08-28 15:31 ` [PATCH v2] " Puranjay Mohan
2024-08-28 15:52 ` Keith Busch
2024-08-29 4:28 ` Christoph Hellwig
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=Zs8360kRPGa1B5xy@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=pjy@amazon.com \
--cc=puranjay@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox