aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r--block/blk-sysfs.c12
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
103static ssize_t queue_hw_sector_size_show(struct request_queue *q, char *page) 103static 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
108static ssize_t 108static ssize_t
@@ -249,7 +249,12 @@ static struct queue_sysfs_entry queue_iosched_entry = {
249 249
250static struct queue_sysfs_entry queue_hw_sector_size_entry = { 250static 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
255static 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
255static struct queue_sysfs_entry queue_nonrot_entry = { 260static 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,