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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index d9b9afab3456..bc28776ba76a 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -102,6 +102,11 @@ static ssize_t queue_max_sectors_show(struct request_queue *q, char *page)
102 return queue_var_show(max_sectors_kb, (page)); 102 return queue_var_show(max_sectors_kb, (page));
103} 103}
104 104
105static ssize_t queue_hw_sector_size_show(struct request_queue *q, char *page)
106{
107 return queue_var_show(q->hardsect_size, page);
108}
109
105static ssize_t 110static ssize_t
106queue_max_sectors_store(struct request_queue *q, const char *page, size_t count) 111queue_max_sectors_store(struct request_queue *q, const char *page, size_t count)
107{ 112{
@@ -160,12 +165,18 @@ static struct queue_sysfs_entry queue_iosched_entry = {
160 .store = elv_iosched_store, 165 .store = elv_iosched_store,
161}; 166};
162 167
168static struct queue_sysfs_entry queue_hw_sector_size_entry = {
169 .attr = {.name = "hw_sector_size", .mode = S_IRUGO },
170 .show = queue_hw_sector_size_show,
171};
172
163static struct attribute *default_attrs[] = { 173static struct attribute *default_attrs[] = {
164 &queue_requests_entry.attr, 174 &queue_requests_entry.attr,
165 &queue_ra_entry.attr, 175 &queue_ra_entry.attr,
166 &queue_max_hw_sectors_entry.attr, 176 &queue_max_hw_sectors_entry.attr,
167 &queue_max_sectors_entry.attr, 177 &queue_max_sectors_entry.attr,
168 &queue_iosched_entry.attr, 178 &queue_iosched_entry.attr,
179 &queue_hw_sector_size_entry.attr,
169 NULL, 180 NULL,
170}; 181};
171 182