Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1610261

Re: [PATCH] sd: Consider max_xfer_blocks if opt_xfer_blocks is unusable

From "Martin K. Petersen" <martin.petersen@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH] sd: Consider max_xfer_blocks if opt_xfer_blocks is unusable
Date 2017-03-28 04:20 +0200
Message-ID <tpOTM-P6-11@gated-at.bofh.it> (permalink)
References <tpDOG-Ur-23@gated-at.bofh.it>
Organization Oracle Corporation

Show all headers | View raw


Fam Zheng <famz@redhat.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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] sd: Consider max_xfer_blocks if opt_xfer_blocks is unusable Fam Zheng <famz@redhat.com> - 2017-03-27 16:30 +0200
  Re: [PATCH] sd: Consider max_xfer_blocks if opt_xfer_blocks is  unusable Laurence Oberman <loberman@redhat.com> - 2017-03-27 18:10 +0200
  Re: [PATCH] sd: Consider max_xfer_blocks if opt_xfer_blocks is unusable "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-03-28 04:20 +0200

csiph-web