public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 7.1] ublk: report BLK_SPLIT_INTERVAL_CAPABLE
@ 2026-02-24 15:57 Caleb Sander Mateos
  2026-02-24 16:00 ` Keith Busch
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Caleb Sander Mateos @ 2026-02-24 15:57 UTC (permalink / raw)
  To: Ming Lei, Jens Axboe
  Cc: Keith Busch, Caleb Sander Mateos, linux-block, linux-kernel

The ublk driver doesn't access request integrity buffers directly, it
only copies them to/from the ublk server in ublk_copy_user_integrity().
ublk_copy_user_integrity() uses bio_for_each_integrity_vec() to walk all
the integrity segments. ublk devices are therefore capable of handling
requests with integrity intervals split across segments. Set
BLK_SPLIT_INTERVAL_CAPABLE in the struct blk_integrity flags for ublk
devices to opt out of the integrity-interval dma_alignment limit.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
---
 drivers/block/ublk_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index 004f367243b6..34ed4f6a02ef 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -806,11 +806,11 @@ static void ublk_dev_param_basic_apply(struct ublk_device *ub)
 	set_capacity(ub->ub_disk, p->dev_sectors);
 }
 
 static int ublk_integrity_flags(u32 flags)
 {
-	int ret_flags = 0;
+	int ret_flags = BLK_SPLIT_INTERVAL_CAPABLE;
 
 	if (flags & LBMD_PI_CAP_INTEGRITY) {
 		flags &= ~LBMD_PI_CAP_INTEGRITY;
 		ret_flags |= BLK_INTEGRITY_DEVICE_CAPABLE;
 	}
-- 
2.45.2


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

* Re: [PATCH 7.1] ublk: report BLK_SPLIT_INTERVAL_CAPABLE
  2026-02-24 15:57 [PATCH 7.1] ublk: report BLK_SPLIT_INTERVAL_CAPABLE Caleb Sander Mateos
@ 2026-02-24 16:00 ` Keith Busch
  2026-02-24 21:18 ` Martin K. Petersen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Keith Busch @ 2026-02-24 16:00 UTC (permalink / raw)
  To: Caleb Sander Mateos; +Cc: Ming Lei, Jens Axboe, linux-block, linux-kernel

On Tue, Feb 24, 2026 at 08:57:22AM -0700, Caleb Sander Mateos wrote:
> The ublk driver doesn't access request integrity buffers directly, it
> only copies them to/from the ublk server in ublk_copy_user_integrity().
> ublk_copy_user_integrity() uses bio_for_each_integrity_vec() to walk all
> the integrity segments. ublk devices are therefore capable of handling
> requests with integrity intervals split across segments. Set
> BLK_SPLIT_INTERVAL_CAPABLE in the struct blk_integrity flags for ublk
> devices to opt out of the integrity-interval dma_alignment limit.

Looks good:

Reviewed-by: Keith Busch <kbusch@kernel.org>

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

* Re: [PATCH 7.1] ublk: report BLK_SPLIT_INTERVAL_CAPABLE
  2026-02-24 15:57 [PATCH 7.1] ublk: report BLK_SPLIT_INTERVAL_CAPABLE Caleb Sander Mateos
  2026-02-24 16:00 ` Keith Busch
@ 2026-02-24 21:18 ` Martin K. Petersen
  2026-02-25  2:48 ` Ming Lei
  2026-02-25 15:37 ` Jens Axboe
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2026-02-24 21:18 UTC (permalink / raw)
  To: Caleb Sander Mateos
  Cc: Ming Lei, Jens Axboe, Keith Busch, linux-block, linux-kernel


Caleb,

> The ublk driver doesn't access request integrity buffers directly, it
> only copies them to/from the ublk server in ublk_copy_user_integrity().
> ublk_copy_user_integrity() uses bio_for_each_integrity_vec() to walk all
> the integrity segments. ublk devices are therefore capable of handling
> requests with integrity intervals split across segments. Set
> BLK_SPLIT_INTERVAL_CAPABLE in the struct blk_integrity flags for ublk
> devices to opt out of the integrity-interval dma_alignment limit.

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

-- 
Martin K. Petersen

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

* Re: [PATCH 7.1] ublk: report BLK_SPLIT_INTERVAL_CAPABLE
  2026-02-24 15:57 [PATCH 7.1] ublk: report BLK_SPLIT_INTERVAL_CAPABLE Caleb Sander Mateos
  2026-02-24 16:00 ` Keith Busch
  2026-02-24 21:18 ` Martin K. Petersen
@ 2026-02-25  2:48 ` Ming Lei
  2026-02-25 15:37 ` Jens Axboe
  3 siblings, 0 replies; 5+ messages in thread
From: Ming Lei @ 2026-02-25  2:48 UTC (permalink / raw)
  To: Caleb Sander Mateos; +Cc: Jens Axboe, Keith Busch, linux-block, linux-kernel

On Tue, Feb 24, 2026 at 08:57:22AM -0700, Caleb Sander Mateos wrote:
> The ublk driver doesn't access request integrity buffers directly, it
> only copies them to/from the ublk server in ublk_copy_user_integrity().
> ublk_copy_user_integrity() uses bio_for_each_integrity_vec() to walk all
> the integrity segments. ublk devices are therefore capable of handling
> requests with integrity intervals split across segments. Set
> BLK_SPLIT_INTERVAL_CAPABLE in the struct blk_integrity flags for ublk
> devices to opt out of the integrity-interval dma_alignment limit.
> 
> Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
> ---
>  drivers/block/ublk_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
> index 004f367243b6..34ed4f6a02ef 100644
> --- a/drivers/block/ublk_drv.c
> +++ b/drivers/block/ublk_drv.c
> @@ -806,11 +806,11 @@ static void ublk_dev_param_basic_apply(struct ublk_device *ub)
>  	set_capacity(ub->ub_disk, p->dev_sectors);
>  }
>  
>  static int ublk_integrity_flags(u32 flags)
>  {
> -	int ret_flags = 0;
> +	int ret_flags = BLK_SPLIT_INTERVAL_CAPABLE;
>  
>  	if (flags & LBMD_PI_CAP_INTEGRITY) {
>  		flags &= ~LBMD_PI_CAP_INTEGRITY;
>  		ret_flags |= BLK_INTEGRITY_DEVICE_CAPABLE;

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

Thanks, 
Ming


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

* Re: [PATCH 7.1] ublk: report BLK_SPLIT_INTERVAL_CAPABLE
  2026-02-24 15:57 [PATCH 7.1] ublk: report BLK_SPLIT_INTERVAL_CAPABLE Caleb Sander Mateos
                   ` (2 preceding siblings ...)
  2026-02-25  2:48 ` Ming Lei
@ 2026-02-25 15:37 ` Jens Axboe
  3 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2026-02-25 15:37 UTC (permalink / raw)
  To: Ming Lei, Caleb Sander Mateos; +Cc: Keith Busch, linux-block, linux-kernel


On Tue, 24 Feb 2026 08:57:22 -0700, Caleb Sander Mateos wrote:
> The ublk driver doesn't access request integrity buffers directly, it
> only copies them to/from the ublk server in ublk_copy_user_integrity().
> ublk_copy_user_integrity() uses bio_for_each_integrity_vec() to walk all
> the integrity segments. ublk devices are therefore capable of handling
> requests with integrity intervals split across segments. Set
> BLK_SPLIT_INTERVAL_CAPABLE in the struct blk_integrity flags for ublk
> devices to opt out of the integrity-interval dma_alignment limit.
> 
> [...]

Applied, thanks!

[1/1] ublk: report BLK_SPLIT_INTERVAL_CAPABLE
      commit: c1dfbd7e71b0a75374a4e65c9d4c6eb66a31e6fc

Best regards,
-- 
Jens Axboe




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

end of thread, other threads:[~2026-02-25 15:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-24 15:57 [PATCH 7.1] ublk: report BLK_SPLIT_INTERVAL_CAPABLE Caleb Sander Mateos
2026-02-24 16:00 ` Keith Busch
2026-02-24 21:18 ` Martin K. Petersen
2026-02-25  2:48 ` Ming Lei
2026-02-25 15:37 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox