From: Leon Romanovsky <leon@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Sagi Grimberg <sagi@grimberg.me>,
Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nvme-pci: add missing condition check for existence of mapped data
Date: Tue, 30 Jul 2024 20:39:20 +0300 [thread overview]
Message-ID: <20240730173920.GD4209@unreal> (raw)
In-Reply-To: <20240730172111.GA32320@lst.de>
On Tue, Jul 30, 2024 at 07:21:11PM +0200, Christoph Hellwig wrote:
> On Tue, Jul 30, 2024 at 11:09:04AM -0600, Keith Busch wrote:
> > > + if (blk_rq_nr_phys_segments(req))
> > > + nvme_unmap_data(dev, req);
> >
> > This is already applied, but it is kind of strange. We get here only if
> > metadata mapping fails. Is there actually a command that has metadata
> > without data?
>
> Well, passthrough can always set metadata to map without data even
> if there is no NVMe defined command that works that way, so we should
> handle the error.
>
> But I suspect this is due to Leon's dma-mapping work, and it probably
> points to a bug in that :)
Yeah, something like that. I had a bug in my code and saw this
asymmetry while reviewed all paths which lead to nvme_unmap_data().
Thanks
prev parent reply other threads:[~2024-07-30 17:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240724180451epcas5p3cffc89fcc59156ca49078a60851f1e29@epcas5p3.samsung.com>
2024-07-24 10:31 ` [PATCH] nvme-pci: add missing condition check for existence of mapped data Leon Romanovsky
2024-07-24 17:57 ` Nitesh Shetty
2024-07-25 14:06 ` Christoph Hellwig
2024-07-25 14:29 ` Keith Busch
2024-07-30 17:09 ` Keith Busch
2024-07-30 17:21 ` Christoph Hellwig
2024-07-30 17:33 ` Keith Busch
2024-07-30 17:39 ` Leon Romanovsky [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=20240730173920.GD4209@unreal \
--to=leon@kernel.org \
--cc=axboe@kernel.dk \
--cc=chaitanya.kulkarni@wdc.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox