Re: [PATCH 3/9] nvme-pci: simplify nvme_pci_metadata_use_sgls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 10, 2025 at 07:06:41AM +0200, Christoph Hellwig wrote:
> +static inline bool nvme_pci_metadata_use_sgls(struct request *req)
>  {
> -	if (!nvme_ctrl_meta_sgl_supported(&dev->ctrl))
> -		return false;
>  	return req->nr_integrity_segments > 1 ||
>  		nvme_req(req)->flags & NVME_REQ_USERCMD;
>  }

...


> @@ -981,7 +979,7 @@ static blk_status_t nvme_map_metadata(struct nvme_dev *dev, struct request *req)
>  	struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
>  
>  	if ((iod->cmd.common.flags & NVME_CMD_SGL_METABUF) &&
> -	    nvme_pci_metadata_use_sgls(dev, req))
> +	    nvme_pci_metadata_use_sgls(req))
>  		return nvme_pci_setup_meta_sgls(dev, req);
>  	return nvme_pci_setup_meta_mptr(dev, req);
>  }

Am I missing something here? This looks like it forces user commands to
use metadata SGLs even if the controller doesn't support it.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux