Re: [PATCH 6/7] nvme: also return I/O command effects from nvme_command_effects

Christoph Hellwig
2022-12-13T18:54:31Z

On Tue, Dec 13, 2022 at 10:53:07AM -0700, Keith Busch wrote:
> Also nvme_cmd_write_uncorr.

Indeed.

> I think you'd need to know the namespace's command set to assume these
> opcodes, though.

ctrl->effects always is NVM command set if supported, or otherwise
empty for I/O commands.

> I was thinking instead of appending effects per-IO, we could always set
> ns->head->effects even if the device doesn't support the log page, then
> overwrite the log page's opcodes with known LBCC effects during
> initialization. That way we don't need a per-io check. Does that sound
> reasonable?

I'd prefer to keep OR ingin the known worst cases. But we can do
that at setup time.