block: add sysfs entry for virt boundary mask
PATCH 1/1 block: add sysfs entry for virt boundary mask
This entry will expose the bio vector alignment mask for a specific block device.
--- block/blk-sysfs.c | 7 +++++++ 1 file changed, 7 insertions(+)
block/blk-sysfs.c +7 -0
@@ -264,6 +264,11 @@ static ssize_t queue_max_hw_sectors_show(struct request_queue *q, char *page)return queue_var_show (max_hw_sectors_kb, (page)); } +static ssize_t queue_virt_boundary_mask_show (struct request_queue *q,char *page) +{ +return queue_var_show (q->limits.virt_boundary_mask, (page)); +} +#define QUEUE_SYSFS_BIT_FNS (name, flag, neg) \ static ssize_t \ queue_##name##_show(struct request_queue *q, char *page) \
@@ -610,6 +615,7 @@ QUEUE_RO_ENTRY(queue_fua, "fua");QUEUE_RO_ENTRY (queue_dax,"dax" );QUEUE_RW_ENTRY (queue_io_timeout,"io_timeout" );QUEUE_RW_ENTRY (queue_wb_lat,"wbt_lat_usec" ); +QUEUE_RO_ENTRY (queue_virt_boundary_mask,"virt_boundary_mask" );#ifdef CONFIG_BLK_DEV_THROTTLING_LOW QUEUE_RW_ENTRY (blk_throtl_sample_time,"throttle_sample_time" );
@@ -670,6 +676,7 @@ static struct attribute *queue_attrs[] = {#ifdef CONFIG_BLK_DEV_THROTTLING_LOW &blk_throtl_sample_time_entry.attr, #endif + &queue_virt_boundary_mask_entry.attr, NULL, };
Signature · 1 line
2.25.4
block/blk-sysfs.c static ssize_t queue_max_hw_sectors_show(struct request_queue *q, char *page) · line 269
Quoted 1 line · Max Gurtovoy
block/blk-sysfs.c +1
-0+return queue_var_show (q->limits.virt_boundary_mask, (page));
's/(page)/page/' ?
Quoted 34 lines · Max Gurtovoy
This entry will expose the bio vector alignment mask for a specific block device.
Signed-off-by Max Gurtovoy <[email protected]>--- block/blk-sysfs.c | 7 +++++++ 1 file changed, 7 insertions(+)block/blk-sysfs.c +6
-0@@ -264,6 +264,11 @@ static ssize_t queue_max_hw_sectors_show(struct request_queue *q, char *page)return queue_var_show (max_hw_sectors_kb, (page)); } +static ssize_t queue_virt_boundary_mask_show (struct request_queue *q,char *page) +{ +return queue_var_show (q->limits.virt_boundary_mask, (page)); +} +#define QUEUE_SYSFS_BIT_FNS (name, flag, neg) \ static ssize_t \ queue_##name##_show(struct request_queue *q, char *page) \@@ -610,6 +615,7 @@ QUEUE_RO_ENTRY(queue_fua, "fua");QUEUE_RO_ENTRY (queue_dax,"dax" );QUEUE_RW_ENTRY (queue_io_timeout,"io_timeout" );QUEUE_RW_ENTRY (queue_wb_lat,"wbt_lat_usec" ); +QUEUE_RO_ENTRY (queue_virt_boundary_mask,"virt_boundary_mask" );#ifdef CONFIG_BLK_DEV_THROTTLING_LOW QUEUE_RW_ENTRY (blk_throtl_sample_time,"throttle_sample_time" );
block/blk-sysfs.c static struct attribute *queue_attrs[] = { · line 681
Quoted 6 lines
block/blk-sysfs.c +1
-0@@ -670,6 +676,7 @@ static struct attribute *queue_attrs[] = {#ifdef CONFIG_BLK_DEV_THROTTLING_LOW &blk_throtl_sample_time_entry.attr, #endif + &queue_virt_boundary_mask_entry.attr, NULL, };
Signature · 1 line
Ming Lei
Max,
Quoted 2 lines
This entry will expose the bio vector alignment mask for a specific block device.
Looks fine except for the (page) that Chaitanya also pointed out.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Quoted 5 lines · Martin K. Petersen
Max,
Quoted 2 lines
This entry will expose the bio vector alignment mask for a specific block device.
Looks fine except for the (page) that Chaitanya also pointed out.
thanks for the review. In blk-sysfs.c we see both "(page) or page". I'm fine with Both.
Jens, can this be fixed during the merge to the preferred option please ?
Quoted 3 lines
Reviewed-by Martin K. Petersen <[email protected]>
Jens Axboe
maintainerQuoted 2 lines · Max Gurtovoy
This entry will expose the bio vector alignment mask for a specific block device.
Applied with page fixup.
Signature · 1 line
Jens Axboe