ublk: enable zoned storage support
authorAndreas Hindborg <a.hindborg@samsung.com>
Fri, 4 Aug 2023 11:46:10 +0000 (13:46 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 8 Aug 2023 21:45:53 +0000 (15:45 -0600)
commit29802d7ca33bc0a75c9da2a143eeed4f9e99fca4
tree220db1862acb82d70cc2525e6a146c17207c03c6
parent1a6e88b9593b63ccdfe1d84e3f99dd91e4f8d490
ublk: enable zoned storage support

Add zoned storage support to ublk: report_zones and operations:
 - REQ_OP_ZONE_OPEN
 - REQ_OP_ZONE_CLOSE
 - REQ_OP_ZONE_FINISH
 - REQ_OP_ZONE_RESET
 - REQ_OP_ZONE_APPEND

The zone append feature uses the `addr` field of `struct ublksrv_io_cmd` to
communicate ALBA back to the kernel. Therefore ublk must be used with the
user copy feature (UBLK_F_USER_COPY) for zoned storage support to be
available. Without this feature, ublk will not allow zoned storage support.

Signed-off-by: Andreas Hindborg <a.hindborg@samsung.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Tested-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20230804114610.179530-4-nmi@metaspace.dk
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c
include/uapi/linux/ublk_cmd.h