public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@meta.com>
To: <linux-nvme@lists-infradead.org>, <linux-block@vger.kernel.org>,
	<axboe@kernel.dk>
Cc: <hch@lst.de>, <martin.petersen@oracle.com>,
	<csander@purestorage.com>, Ming Lei <ming.lei@redhat.com>,
	Keith Busch <kbusch@kernel.org>
Subject: [PATCHv8 2/2] ublk: report BLK_SPLIT_INTERVAL_CAPABLE
Date: Fri, 13 Mar 2026 07:47:01 -0700	[thread overview]
Message-ID: <20260313144701.1221652-3-kbusch@meta.com> (raw)
In-Reply-To: <20260313144701.1221652-1-kbusch@meta.com>

From: Caleb Sander Mateos <csander@purestorage.com>

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: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 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 004f367243b69..34ed4f6a02ef2 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -808,7 +808,7 @@ static void ublk_dev_param_basic_apply(struct ublk_device *ub)
 
 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;
-- 
2.52.0


  parent reply	other threads:[~2026-03-13 14:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13 14:46 [PATCHv8 0/2] block for-7.1/integrity rebase for mem alignment Keith Busch
2026-03-13 14:47 ` [PATCHv8 1/2] blk-integrity: support arbitrary buffer alignment Keith Busch
2026-03-13 14:47 ` Keith Busch [this message]
2026-03-14 14:14 ` [PATCHv8 0/2] block for-7.1/integrity rebase for mem alignment Jens Axboe
2026-03-23 17:12   ` Keith Busch
2026-03-23 17:14     ` Jens Axboe
2026-03-23 17:21       ` Keith Busch
2026-03-23 17:23         ` Jens Axboe
2026-03-23 17:26           ` Keith Busch
2026-03-23 17:27             ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260313144701.1221652-3-kbusch@meta.com \
    --to=kbusch@meta.com \
    --cc=axboe@kernel.dk \
    --cc=csander@purestorage.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists-infradead.org \
    --cc=martin.petersen@oracle.com \
    --cc=ming.lei@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox