[PATCH] nvme: Allocate memory for xa_store in advance in nvme_get_effects_log
Keisuke Nishimura
keisuke.nishimura at inria.fr
Fri Dec 20 03:50:26 PST 2024
Hello,
On 16/12/2024 16:52, Christoph Hellwig wrote:
> 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.
>
Okay. I do not have any other opinions on this:) I am happy to follow your
suggestion and leave any further decisions to the maintainers of this subsystem
if needed. I will send the patch to directly check xa_store() soon.
Thank you.
Keisuke
More information about the Linux-nvme
mailing list