[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <yq1r31i5evk.fsf@oracle.com>
Date: Mon, 27 Mar 2017 22:11:59 -0400
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: Fam Zheng <famz@...hat.com>
Cc: linux-kernel@...r.kernel.org,
"Martin K. Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org,
"James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>
Subject: Re: [PATCH] sd: Consider max_xfer_blocks if opt_xfer_blocks is unusable
Fam Zheng <famz@...hat.com> writes:
Hi Fam,
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -2957,6 +2957,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
> rw_max = logical_to_sectors(sdp, sdkp->opt_xfer_blocks);
> } else
> rw_max = BLK_DEF_MAX_SECTORS;
> + rw_max = min_not_zero(rw_max, dev_max);
rw_max is in sectors, dev_max is in logical blocks.
>
> /* Combine with controller limits */
> q->limits.max_sectors = min(rw_max, queue_max_hw_sectors(q));
--
Martin K. Petersen Oracle Linux Engineering
Powered by blists - more mailing lists