mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
blk-sysfs: Add 'chunk_sectors' to sysfs attributes
The queue limits already have a 'chunk_sectors' setting, so we should be presenting it via sysfs. Signed-off-by: Hannes Reinecke <[email protected]> [Damien: Updated Documentation/ABI/testing/sysfs-block] Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Reviewed-by: Shaun Tancheff <[email protected]> Tested-by: Shaun Tancheff <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
797476b88b
commit
87caf97cf5
2 changed files with 24 additions and 0 deletions
|
|
@ -130,6 +130,11 @@ static ssize_t queue_physical_block_size_show(struct request_queue *q, char *pag
|
|||
return queue_var_show(queue_physical_block_size(q), page);
|
||||
}
|
||||
|
||||
static ssize_t queue_chunk_sectors_show(struct request_queue *q, char *page)
|
||||
{
|
||||
return queue_var_show(q->limits.chunk_sectors, page);
|
||||
}
|
||||
|
||||
static ssize_t queue_io_min_show(struct request_queue *q, char *page)
|
||||
{
|
||||
return queue_var_show(queue_io_min(q), page);
|
||||
|
|
@ -455,6 +460,11 @@ static struct queue_sysfs_entry queue_physical_block_size_entry = {
|
|||
.show = queue_physical_block_size_show,
|
||||
};
|
||||
|
||||
static struct queue_sysfs_entry queue_chunk_sectors_entry = {
|
||||
.attr = {.name = "chunk_sectors", .mode = S_IRUGO },
|
||||
.show = queue_chunk_sectors_show,
|
||||
};
|
||||
|
||||
static struct queue_sysfs_entry queue_io_min_entry = {
|
||||
.attr = {.name = "minimum_io_size", .mode = S_IRUGO },
|
||||
.show = queue_io_min_show,
|
||||
|
|
@ -555,6 +565,7 @@ static struct attribute *default_attrs[] = {
|
|||
&queue_hw_sector_size_entry.attr,
|
||||
&queue_logical_block_size_entry.attr,
|
||||
&queue_physical_block_size_entry.attr,
|
||||
&queue_chunk_sectors_entry.attr,
|
||||
&queue_io_min_entry.attr,
|
||||
&queue_io_opt_entry.attr,
|
||||
&queue_discard_granularity_entry.attr,
|
||||
|
|
|
|||
Loading…
Reference in a new issue