From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: jaxboe@fusionio.com, James.Bottomley@hansenpartnership.com,
snitzer@redhat.com, linux-scsi@vger.kernel.org
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Subject: [PATCH 1/2] block: Ensure physical block size is unsigned int
Date: Mon, 27 Sep 2010 12:41:03 -0400 [thread overview]
Message-ID: <1285605664-27027-2-git-send-email-martin.petersen@oracle.com> (raw)
In-Reply-To: <1285605664-27027-1-git-send-email-martin.petersen@oracle.com>
Physical block size was declared unsigned int to accomodate the maximum
size reported by READ CAPACITY(16). Make sure we use the right type in
the related functions.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
block/blk-settings.c | 2 +-
include/linux/blkdev.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/block/blk-settings.c b/block/blk-settings.c
index a234f4b..450577d 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -343,7 +343,7 @@ EXPORT_SYMBOL(blk_queue_logical_block_size);
* hardware can operate on without reverting to read-modify-write
* operations.
*/
-void blk_queue_physical_block_size(struct request_queue *q, unsigned short size)
+void blk_queue_physical_block_size(struct request_queue *q, unsigned int size)
{
q->limits.physical_block_size = size;
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 2c54906..9e443b9 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -851,7 +851,7 @@ extern void blk_queue_max_segment_size(struct request_queue *, unsigned int);
extern void blk_queue_max_discard_sectors(struct request_queue *q,
unsigned int max_discard_sectors);
extern void blk_queue_logical_block_size(struct request_queue *, unsigned short);
-extern void blk_queue_physical_block_size(struct request_queue *, unsigned short);
+extern void blk_queue_physical_block_size(struct request_queue *, unsigned int);
extern void blk_queue_alignment_offset(struct request_queue *q,
unsigned int alignment);
extern void blk_limits_io_min(struct queue_limits *limits, unsigned int min);
@@ -1004,7 +1004,7 @@ static inline unsigned int queue_physical_block_size(struct request_queue *q)
return q->limits.physical_block_size;
}
-static inline int bdev_physical_block_size(struct block_device *bdev)
+static inline unsigned int bdev_physical_block_size(struct block_device *bdev)
{
return queue_physical_block_size(bdev_get_queue(bdev));
}
--
1.7.2.2
next prev parent reply other threads:[~2010-09-27 16:41 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 16:41 I/O topology fixes for big physical block size Martin K. Petersen
2010-09-27 16:41 ` Martin K. Petersen [this message]
2010-09-27 17:40 ` [PATCH 1/2] block: Ensure physical block size is unsigned int Mike Snitzer
2010-10-08 5:15 ` Martin K. Petersen
2010-10-13 19:12 ` Mike Snitzer
2010-10-13 19:15 ` Jens Axboe
2010-09-27 16:41 ` [PATCH 2/2] sd: Fix overflow with big physical blocks Martin K. Petersen
2010-09-27 17:42 ` Mike Snitzer
2010-09-27 18:13 ` [PATCH] block: eliminate potential for infinite loop in blkdev_issue_discard Mike Snitzer
2010-10-14 21:37 ` Mike Snitzer
2010-10-15 11:05 ` Jens Axboe
2010-09-27 16:54 ` I/O topology fixes for big physical block size Jens Axboe
2010-09-27 17:20 ` Martin K. Petersen
2010-09-27 22:21 ` Jens Axboe
2010-09-27 22:36 ` Martin K. Petersen
2010-09-27 23:15 ` Mike Snitzer
2010-09-28 4:30 ` Jens Axboe
2010-09-28 5:20 ` Eric Sandeen
2010-09-28 14:15 ` Mike Snitzer
2010-09-28 20:57 ` Ted Ts'o
2010-09-28 21:24 ` Martin K. Petersen
2010-09-28 21:36 ` Eric Sandeen
2010-09-30 16:30 ` Ted Ts'o
2010-09-30 17:07 ` Eric Sandeen
[not found] ` <4CA4C3B6.9000104@redhat.com>
2010-09-30 17:33 ` Mike Snitzer
2010-10-01 14:24 ` Ted Ts'o
2010-10-01 22:19 ` Martin K. Petersen
2010-10-02 2:31 ` Ted Ts'o
2010-10-04 19:49 ` Martin K. Petersen
2010-09-27 17:23 ` Mike Snitzer
2010-09-27 21:58 ` James Bottomley
2010-09-27 22:03 ` Jens Axboe
2010-09-27 22:14 ` Martin K. Petersen
2010-09-27 22:24 ` Jens Axboe
2010-09-28 18:48 ` Martin K. Petersen
2010-09-28 18:54 ` Mike Snitzer
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=1285605664-27027-2-git-send-email-martin.petersen@oracle.com \
--to=martin.petersen@oracle.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=jaxboe@fusionio.com \
--cc=linux-scsi@vger.kernel.org \
--cc=snitzer@redhat.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;
as well as URLs for NNTP newsgroup(s).