From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: linux-scsi@vger.kernel.org
Cc: borntraeger@de.ibm.com,
"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: [PATCH] sd: Optimal I/O size is in bytes, not sectors
Date: Wed, 20 Jan 2016 11:01:23 -0500 [thread overview]
Message-ID: <1453305683-22424-1-git-send-email-martin.petersen@oracle.com> (raw)
Commit ca369d51b3e1 ("block/sd: Fix device-imposed transfer length
limits") accidentally switched optimal I/O size reporting from bytes to
block layer sectors.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
drivers/scsi/sd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 4e08d1cd704d..ec163d08f6c3 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2893,7 +2893,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
sdkp->opt_xfer_blocks <= SD_DEF_XFER_BLOCKS &&
sdkp->opt_xfer_blocks * sdp->sector_size >= PAGE_CACHE_SIZE)
rw_max = q->limits.io_opt =
- logical_to_sectors(sdp, sdkp->opt_xfer_blocks);
+ sdkp->opt_xfer_blocks * sdp->sector_size;
else
rw_max = BLK_DEF_MAX_SECTORS;
--
2.5.0
next reply other threads:[~2016-01-20 16:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-20 16:01 Martin K. Petersen [this message]
2016-01-20 16:11 ` [PATCH] sd: Optimal I/O size is in bytes, not sectors Johannes Thumshirn
2016-01-20 16:19 ` James Bottomley
2016-01-20 16:40 ` Martin K. Petersen
2016-01-20 16:47 ` James Bottomley
2016-01-22 8:16 ` Greg Kroah-Hartman
2016-01-20 16:19 ` Matthew R. Ochs
2016-01-20 17:17 ` Ewan Milne
2016-01-20 18:28 ` Christian Borntraeger
2016-05-12 4:04 ` Fam Zheng
2016-05-12 17:13 ` Tom Yan
2016-05-13 2:32 ` Martin K. Petersen
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=1453305683-22424-1-git-send-email-martin.petersen@oracle.com \
--to=martin.petersen@oracle.com \
--cc=borntraeger@de.ibm.com \
--cc=linux-scsi@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).