ublk: report BLK_SPLIT_INTERVAL_CAPABLE
Subsystems (2)
PATCH 1/1 ublk: report BLK_SPLIT_INTERVAL_CAPABLE
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.
--- drivers/block/ublk_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/ublk_drv.c +1 -1
@@ -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 ; }
Signature · 1 line
2.45.2
Quoted 7 lines · Caleb Sander Mateos
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()usesbio_for_each_integrity_vec()to walk all the integrity segments. ublk devices are therefore capable of handling requests with integrity intervals split across segments. SetBLK_SPLIT_INTERVAL_CAPABLEin the structblk_integrityflags for ublk devices to opt out of the integrity-intervaldma_alignmentlimit.
Looks good:
Caleb,
Quoted 7 lines
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()usesbio_for_each_integrity_vec()to walk all the integrity segments. ublk devices are therefore capable of handling requests with integrity intervals split across segments. SetBLK_SPLIT_INTERVAL_CAPABLEin the structblk_integrityflags for ublk devices to opt out of the integrity-intervaldma_alignmentlimit.
Signature · 1 line
Martin K. Petersen
Quoted 19 lines · Caleb Sander Mateos
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()usesbio_for_each_integrity_vec()to walk all the integrity segments. ublk devices are therefore capable of handling requests with integrity intervals split across segments. SetBLK_SPLIT_INTERVAL_CAPABLEin the structblk_integrityflags for ublk devices to opt out of the integrity-intervaldma_alignmentlimit.Signed-off-by Caleb Sander Mateos <[email protected]>--- drivers/block/ublk_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/block/ublk_drv.c +0
-0@@ -806,11 +806,11 @@ static void ublk_dev_param_basic_apply(struct ublk_device *ub)set_capacity (ub->ub_disk, p->dev_sectors);
drivers/block/ublk_drv.c static void ublk_dev_param_basic_apply(struct ublk_device *ub) · line 815
Quoted 10 lines
drivers/block/ublk_drv.c +1
-1}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 ;
Thanks,
Ming
Quoted 9 lines · Caleb Sander Mateos
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()usesbio_for_each_integrity_vec()to walk all the integrity segments. ublk devices are therefore capable of handling requests with integrity intervals split across segments. SetBLK_SPLIT_INTERVAL_CAPABLEin the structblk_integrityflags for ublk devices to opt out of the integrity-intervaldma_alignmentlimit.[...]
Applied, thanks!
[1/1] ublk: report BLK_SPLIT_INTERVAL_CAPABLE
commit: c1dfbd7e71b0a75374a4e65c9d4c6eb66a31e6fc
Best regards,
Signature · 1 line
Jens Axboe