block: add sysfs entry for virt boundary mask
This entry will expose the bio vector alignment mask for a specific block device. Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20210405132012.12504-1-mgurtovoy@nvidia.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
430a67f9d6
commit
28af742875
|
@ -60,7 +60,7 @@ static ssize_t queue_var_store64(s64 *var, const char *page)
|
||||||
|
|
||||||
static ssize_t queue_requests_show(struct request_queue *q, char *page)
|
static ssize_t queue_requests_show(struct request_queue *q, char *page)
|
||||||
{
|
{
|
||||||
return queue_var_show(q->nr_requests, (page));
|
return queue_var_show(q->nr_requests, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t
|
static ssize_t
|
||||||
|
@ -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));
|
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) \
|
#define QUEUE_SYSFS_BIT_FNS(name, flag, neg) \
|
||||||
static ssize_t \
|
static ssize_t \
|
||||||
queue_##name##_show(struct request_queue *q, char *page) \
|
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_RO_ENTRY(queue_dax, "dax");
|
||||||
QUEUE_RW_ENTRY(queue_io_timeout, "io_timeout");
|
QUEUE_RW_ENTRY(queue_io_timeout, "io_timeout");
|
||||||
QUEUE_RW_ENTRY(queue_wb_lat, "wbt_lat_usec");
|
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
|
#ifdef CONFIG_BLK_DEV_THROTTLING_LOW
|
||||||
QUEUE_RW_ENTRY(blk_throtl_sample_time, "throttle_sample_time");
|
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
|
#ifdef CONFIG_BLK_DEV_THROTTLING_LOW
|
||||||
&blk_throtl_sample_time_entry.attr,
|
&blk_throtl_sample_time_entry.attr,
|
||||||
#endif
|
#endif
|
||||||
|
&queue_virt_boundary_mask_entry.attr,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue