From: Bart Van Assche <bart.vanassche@sandisk.com>
To: Long Li <longli@microsoft.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: KY Srinivasan <kys@microsoft.com>, <linux-scsi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Use the correct size to set block max sectors
Date: Thu, 26 May 2016 19:18:35 -0700 [thread overview]
Message-ID: <aad00979-740e-b844-64fb-4bfa646796e5@sandisk.com> (raw)
In-Reply-To: <1464307708-4315-1-git-send-email-longli@microsoft.com>
On 05/26/16 17:08, Long Li wrote:
> The block sector size should be in unit of 512 bytes, not in bytes.
>
> Signed-off-by: Long Li <longli@microsoft.com>
>
> ---
> drivers/scsi/sd.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index 428c03e..4bce17e 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -2862,9 +2862,11 @@ static int sd_revalidate_disk(struct gendisk *disk)
> if (sdkp->opt_xfer_blocks &&
> sdkp->opt_xfer_blocks <= dev_max &&
> sdkp->opt_xfer_blocks <= SD_DEF_XFER_BLOCKS &&
> - sdkp->opt_xfer_blocks * sdp->sector_size >= PAGE_SIZE)
> - rw_max = q->limits.io_opt =
> + sdkp->opt_xfer_blocks * sdp->sector_size >= PAGE_SIZE) {
> + q->limits.io_opt =
> sdkp->opt_xfer_blocks * sdp->sector_size;
> + rw_max = (q->limits.io_opt >> 9);
> + }
> else
> rw_max = BLK_DEF_MAX_SECTORS;
Isn't this a duplicate of a patch Martin Petersen posted three weeks
ago? See also http://thread.gmane.org/gmane.linux.scsi/113746.
Bart.
next prev parent reply other threads:[~2016-05-27 2:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-27 0:08 Long Li
2016-05-27 0:40 ` Fam Zheng
2016-05-27 1:35 ` Joe Perches
2016-05-27 2:18 ` Bart Van Assche [this message]
2016-05-27 4:06 ` Long Li
2016-06-01 2:44 ` Martin K. Petersen
2016-06-03 22:42 ` Long Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aad00979-740e-b844-64fb-4bfa646796e5@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®