Re: [PATCH] nvme: check if the namespace supports metadata in nvme_map_user_request()
From: Puranjay Mohan
Date: Tue Aug 27 2024 - 08:29:00 EST
Christoph Hellwig <hch@xxxxxx> writes:
> On Tue, Aug 27, 2024 at 12:17:01PM +0000, Puranjay Mohan wrote:
>> + if (meta_buffer && meta_len && bdev && !blk_get_integrity(bdev->bd_disk))
>> + return -EINVAL;
>
> Overly long line here. If we go past my initial RFC I'd probably
> restructure the function a little bit, i.e. add a new
>
> bool has_metadata = bdev && meta_buffer && meta_len;
>
> and then use that both for the support check and the actualy mapping
> below.
Sure,
I will send v2 with these changes now.
P.S. - It looks like we will need manual backports for stable kernels as
this won't apply directly. I will send them after this is accepted.
Thanks,
Puranjay