diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2009-05-22 17:17:49 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-22 17:22:54 -0400 |
commit | e1defc4ff0cf57aca6c5e3ff99fa503f5943c1f1 (patch) | |
tree | d60d15a082171c58ac811d547d51a9c3119f23e3 /block/blk-sysfs.c | |
parent | 9bd7de51ee8537094656149eaf45338cadb7d7d4 (diff) |
block: Do away with the notion of hardsect_size
Until now we have had a 1:1 mapping between storage device physical
block size and the logical block sized used when addressing the device.
With SATA 4KB drives coming out that will no longer be the case. The
sector size will be 4KB but the logical block size will remain
512-bytes. Hence we need to distinguish between the physical block size
and the logical ditto.
This patch renames hardsect_size to logical_block_size.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r-- | block/blk-sysfs.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 3ff9bba3379a..13d38b7e4d0f 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c | |||
@@ -100,9 +100,9 @@ static ssize_t queue_max_sectors_show(struct request_queue *q, char *page) | |||
100 | return queue_var_show(max_sectors_kb, (page)); | 100 | return queue_var_show(max_sectors_kb, (page)); |
101 | } | 101 | } |
102 | 102 | ||
103 | static ssize_t queue_hw_sector_size_show(struct request_queue *q, char *page) | 103 | static ssize_t queue_logical_block_size_show(struct request_queue *q, char *page) |
104 | { | 104 | { |
105 | return queue_var_show(q->hardsect_size, page); | 105 | return queue_var_show(queue_logical_block_size(q), page); |
106 | } | 106 | } |
107 | 107 | ||
108 | static ssize_t | 108 | static ssize_t |
@@ -249,7 +249,12 @@ static struct queue_sysfs_entry queue_iosched_entry = { | |||
249 | 249 | ||
250 | static struct queue_sysfs_entry queue_hw_sector_size_entry = { | 250 | static struct queue_sysfs_entry queue_hw_sector_size_entry = { |
251 | .attr = {.name = "hw_sector_size", .mode = S_IRUGO }, | 251 | .attr = {.name = "hw_sector_size", .mode = S_IRUGO }, |
252 | .show = queue_hw_sector_size_show, | 252 | .show = queue_logical_block_size_show, |
253 | }; | ||
254 | |||
255 | static struct queue_sysfs_entry queue_logical_block_size_entry = { | ||
256 | .attr = {.name = "logical_block_size", .mode = S_IRUGO }, | ||
257 | .show = queue_logical_block_size_show, | ||
253 | }; | 258 | }; |
254 | 259 | ||
255 | static struct queue_sysfs_entry queue_nonrot_entry = { | 260 | static struct queue_sysfs_entry queue_nonrot_entry = { |
@@ -283,6 +288,7 @@ static struct attribute *default_attrs[] = { | |||
283 | &queue_max_sectors_entry.attr, | 288 | &queue_max_sectors_entry.attr, |
284 | &queue_iosched_entry.attr, | 289 | &queue_iosched_entry.attr, |
285 | &queue_hw_sector_size_entry.attr, | 290 | &queue_hw_sector_size_entry.attr, |
291 | &queue_logical_block_size_entry.attr, | ||
286 | &queue_nonrot_entry.attr, | 292 | &queue_nonrot_entry.attr, |
287 | &queue_nomerges_entry.attr, | 293 | &queue_nomerges_entry.attr, |
288 | &queue_rq_affinity_entry.attr, | 294 | &queue_rq_affinity_entry.attr, |