All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] block: add sysfs entry for virt boundary mask
@ 2021-04-05 13:20 Max Gurtovoy
  2021-04-05 17:40 ` Chaitanya Kulkarni
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Max Gurtovoy @ 2021-04-05 13:20 UTC (permalink / raw)
  To: linux-block, axboe; +Cc: martin.petersen, Max Gurtovoy

This entry will expose the bio vector alignment mask for a specific
block device.

Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
---
 block/blk-sysfs.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 0f4f0c8a7825..86a545e6d82d 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -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,
 };
 
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] block: add sysfs entry for virt boundary mask
  2021-04-05 13:20 [PATCH 1/1] block: add sysfs entry for virt boundary mask Max Gurtovoy
@ 2021-04-05 17:40 ` Chaitanya Kulkarni
  2021-04-06  1:46 ` Ming Lei
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2021-04-05 17:40 UTC (permalink / raw)
  To: Max Gurtovoy; +Cc: linux-block, axboe, martin.petersen

On 4/5/21 06:20, Max Gurtovoy wrote:
> +	return queue_var_show(q->limits.virt_boundary_mask, (page));

's/(page)/page/' ?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] block: add sysfs entry for virt boundary mask
  2021-04-05 13:20 [PATCH 1/1] block: add sysfs entry for virt boundary mask Max Gurtovoy
  2021-04-05 17:40 ` Chaitanya Kulkarni
@ 2021-04-06  1:46 ` Ming Lei
  2021-04-06  1:53 ` Martin K. Petersen
  2021-04-06 15:23 ` Jens Axboe
  3 siblings, 0 replies; 6+ messages in thread
From: Ming Lei @ 2021-04-06  1:46 UTC (permalink / raw)
  To: Max Gurtovoy; +Cc: linux-block, Jens Axboe, Martin K. Petersen

On Tue, Apr 6, 2021 at 4:43 AM Max Gurtovoy <mgurtovoy@nvidia.com> wrote:
>
> This entry will expose the bio vector alignment mask for a specific
> block device.
>
> Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
> ---
>  block/blk-sysfs.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
> index 0f4f0c8a7825..86a545e6d82d 100644
> --- a/block/blk-sysfs.c
> +++ b/block/blk-sysfs.c
> @@ -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,
>  };

Reviewed-by: Ming Lei <ming.lei@redhat.com>


-- 
Ming Lei

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] block: add sysfs entry for virt boundary mask
  2021-04-05 13:20 [PATCH 1/1] block: add sysfs entry for virt boundary mask Max Gurtovoy
  2021-04-05 17:40 ` Chaitanya Kulkarni
  2021-04-06  1:46 ` Ming Lei
@ 2021-04-06  1:53 ` Martin K. Petersen
  2021-04-06  8:16   ` Max Gurtovoy
  2021-04-06 15:23 ` Jens Axboe
  3 siblings, 1 reply; 6+ messages in thread
From: Martin K. Petersen @ 2021-04-06  1:53 UTC (permalink / raw)
  To: Max Gurtovoy; +Cc: linux-block, axboe, martin.petersen


Max,

> 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.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] block: add sysfs entry for virt boundary mask
  2021-04-06  1:53 ` Martin K. Petersen
@ 2021-04-06  8:16   ` Max Gurtovoy
  0 siblings, 0 replies; 6+ messages in thread
From: Max Gurtovoy @ 2021-04-06  8:16 UTC (permalink / raw)
  To: Martin K. Petersen; +Cc: linux-block, axboe


On 4/6/2021 4:53 AM, Martin K. Petersen wrote:
> Max,
>
>> 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 ?


>
> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] block: add sysfs entry for virt boundary mask
  2021-04-05 13:20 [PATCH 1/1] block: add sysfs entry for virt boundary mask Max Gurtovoy
                   ` (2 preceding siblings ...)
  2021-04-06  1:53 ` Martin K. Petersen
@ 2021-04-06 15:23 ` Jens Axboe
  3 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2021-04-06 15:23 UTC (permalink / raw)
  To: Max Gurtovoy, linux-block; +Cc: martin.petersen

On 4/5/21 7:20 AM, Max Gurtovoy wrote:
> This entry will expose the bio vector alignment mask for a specific
> block device.

Applied with page fixup.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-06 15:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05 13:20 [PATCH 1/1] block: add sysfs entry for virt boundary mask Max Gurtovoy
2021-04-05 17:40 ` Chaitanya Kulkarni
2021-04-06  1:46 ` Ming Lei
2021-04-06  1:53 ` Martin K. Petersen
2021-04-06  8:16   ` Max Gurtovoy
2021-04-06 15:23 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.