[PATCH 0/3] block: expose 'read_keys' and 'read_reservation' PR callbacks

Hannes Reinecke
2025-06-03T10:06:03Z

Hi all,

the generic persistent reservation framework already has callbacks for 'read_keys'
and 'read_reservation', but these callbacks are not exposed via ioctls (unlike
the other callbacks). As we need this information if we want to work with persistent
reservations reliably add two new persistent reservation ioctls 'IOC_PR_READ_KEYS'
and 'IOC_PR_READ_RESV' to expose this information to userspace.

As usual, comments and reviews are welcome.

Hannes Reinecke (3):
block: add 'read_keys' persistent reservation ioctl
block: add 'read_reservation' persistent reservation ioctl
scsi: return PR generation if no reservation is held

block/ioctl.c | 61 +++++++++++++++++++++++++++++++++++++++++
drivers/scsi/sd.c | 10 +++++--
include/linux/pr.h | 12 --------
include/uapi/linux/pr.h | 14 ++++++++++
4 files changed, 82 insertions(+), 15 deletions(-)

--
2.35.3