[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yq18roprg0r.fsf@ca-mkp.ca.oracle.com>
Date: Mon, 18 Jul 2022 22:30:39 -0400
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: John Garry <john.garry@...wei.com>
Cc: <damien.lemoal@...nsource.wdc.com>, <joro@...tes.org>,
<will@...nel.org>, <jejb@...ux.ibm.com>,
<martin.petersen@...cle.com>, <hch@....de>,
<m.szyprowski@...sung.com>, <robin.murphy@....com>,
<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-ide@...r.kernel.org>, <iommu@...ts.linux.dev>,
<linux-scsi@...r.kernel.org>, <linuxarm@...wei.com>
Subject: Re: [PATCH v6 4/6] scsi: sd: Allow max_sectors be capped at DMA
optimal size limit
John,
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index a1a2ac09066f..3eaee1f7aaca 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -3296,6 +3296,8 @@ static int sd_revalidate_disk(struct gendisk *disk)
> (sector_t)BLK_DEF_MAX_SECTORS);
> }
>
> + rw_max = min_not_zero(rw_max, sdp->host->opt_sectors);
> +
> /* Do not exceed controller limit */
> rw_max = min(rw_max, queue_max_hw_sectors(q));
I'm OK with this approach.
Acked-by: Martin K. Petersen <martin.petersen@...cle.com>
--
Martin K. Petersen Oracle Linux Engineering
Powered by blists - more mailing lists