Re: [PATCH] nvme: check if the namespace supports metadata in nvme_map_user_request()

From: Keith Busch
Date: Fri Sep 06 2024 - 14:07:32 EST


On Tue, Aug 27, 2024 at 12:28:45PM +0000, Puranjay Mohan wrote:
>
> 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.

BTW, the reason for your bug observation on older stable but not on
newer ones looks like was originally "fixed" with:

d4aa57a1cac3c99 ("block: don't bother iter advancing a fully done bio")

So while your change is fine, the above commit possibly inadvertently
fixes the inappropriate "advance" because all successful nvme
completions are "fully done".

It still probably doesn't make sense to attempt metadata on request
queues that didn't register with the interface though, so your patch is
also fine.