[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zqkj3hUnsjGgzBE4@kbusch-mbp>
Date: Tue, 30 Jul 2024 11:33:18 -0600
From: Keith Busch <kbusch@...nel.org>
To: Christoph Hellwig <hch@....de>
Cc: Leon Romanovsky <leon@...nel.org>, Jens Axboe <axboe@...nel.dk>,
Sagi Grimberg <sagi@...mberg.me>,
Leon Romanovsky <leonro@...dia.com>,
Chaitanya Kulkarni <chaitanya.kulkarni@....com>,
linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nvme-pci: add missing condition check for existence of
mapped data
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.
That's what I initially thought too, but nvme passthrough maps metadata
only if there's also user data. It doesn't look like you can even build
a request to have metadata if it doesn't have user data: where does the
bio come from in that case?
And generic block stack maps it only for READ or WRITE commands, which
must have payloads too, so I didn't find a path to reach this condition.
Not a big deal, the patch is fine, but I was wondering if we need to
change something else to allow the conditions it proposes to fix.
Powered by blists - more mailing lists