[PATCH 07/20] ublk: set UBLK_IO_F_INTEGRITY in ublksrv_io_desc

Caleb Sander Mateos
2025-12-17T05:35:13Z

Indicate to the ublk server when an incoming request has integrity data
by setting UBLK_IO_F_INTEGRITY in the ublksrv_io_desc's op_flags field.

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

diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index 2893a9172220..d3652ceba96d 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -1107,10 +1107,13 @@ static inline unsigned int ublk_req_build_flags(struct request *req)
flags |= UBLK_IO_F_NOUNMAP;

if (req->cmd_flags & REQ_SWAP)
flags |= UBLK_IO_F_SWAP;

+ if (blk_integrity_rq(req))
+ flags |= UBLK_IO_F_INTEGRITY;
+
return flags;
}

static blk_status_t ublk_setup_iod(struct ublk_queue *ubq, struct request *req)
{
--
2.45.2