[PATCH] nvme: don't flush scan work with non-idle request

Christoph Hellwig hch at lst.de
Tue Aug 23 09:14:08 PDT 2022


On Mon, Aug 22, 2022 at 09:09:10AM -0600, Keith Busch wrote:
> On Sun, Aug 21, 2022 at 04:40:39PM +0200, Christoph Hellwig wrote:
> > With this the flush_work is lost for the target passthrough case.
> > 
> > I also don't really like the double call to nvme_command_effects().
> > 
> > What about just removing nvme_execute_passthru_rq() and open coding
> > it in the two calles, with the nvme_passthru_end call moved until
> > after freeing the request?
> 
> I didn't think it mattered for passthrough because the host needs to flush the
> scan work on its side before safely using the changed namespace. It doesn't
> matter if the target side has flushed out the new namespace format because it's
> not the one creating LBA command parameters.

Well, a passthrough controller is still also available locally, so I don't
think we can just skip the scan.

> Never-the-less, if you do prefer to have each caller open code the sequence, I
> have that patch ready to send.

It's not that I really like the open coding, but it was the first
thing that came to mind on how to fix the passthrough case.



More information about the Linux-nvme mailing list