[PATCH] nvme: Allocate memory for xa_store in advance in nvme_get_effects_log
Christoph Hellwig
hch at lst.de
Mon Dec 16 07:52:29 PST 2024
On Mon, Dec 16, 2024 at 02:06:50PM +0100, Keisuke Nishimura wrote:
> Without this xa_reserve(), if xa_store() fails, we cannot store cel after
> calling nvme_get_log() which can have side effects. My intention is to
> ensure xa_store() succeeds first and, if not, return early before invoking
> nvme_get_log().
While reading various log pages can have side effects there shouldn't be
any for the Command Supported and Effects log page.
> But I am not very familiar with this code. If it is okay to check after the
> nvme_get_log(), I will send the patch soon.
I think it should be fine, but I'm happy to wait for more opinions.
More information about the Linux-nvme
mailing list