public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/4] block: add IOC_PR_READ_KEYS and IOC_PR_READ_RESERVATION ioctls
@ 2025-11-26 16:35 Stefan Hajnoczi
  2025-11-26 16:35 ` [PATCH 1/4] scsi: sd: reject invalid pr_read_keys() num_keys values Stefan Hajnoczi
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Stefan Hajnoczi @ 2025-11-26 16:35 UTC (permalink / raw)
  To: linux-block
  Cc: Martin K. Petersen, linux-kernel, James E.J. Bottomley,
	Mike Christie, Jens Axboe, linux-nvme, Keith Busch, Sagi Grimberg,
	linux-scsi, Christoph Hellwig, Stefan Hajnoczi

This series exposes struct pr_ops pr_read_keys() and pr_read_reservations() to
userspace as ioctls, making it possible to list registered reservation keys and
report the current reservation on a block device.

The new ioctls are needed by applications or cluster managers that rely on
inspecting the PR state. This is something that has been possible with SCSI-
and NVME-specific commands but not with the PR ioctls. I hope to move QEMU from
SG_IO to PR ioctls so that NVMe host block devices can be supported alongside
SCSI devices without protocol-specific commands.

These ioctls will also make troubleshooting possible with the blkpr(8)
util-linux tool, for which I have prepared a separate patch series.

Stefan Hajnoczi (4):
  scsi: sd: reject invalid pr_read_keys() num_keys values
  nvme: reject invalid pr_read_keys() num_keys values
  block: add IOC_PR_READ_KEYS ioctl
  block: add IOC_PR_READ_RESERVATION ioctl

 include/uapi/linux/pr.h | 14 ++++++++
 block/ioctl.c           | 79 +++++++++++++++++++++++++++++++++++++++++
 drivers/nvme/host/pr.c  |  5 +++
 drivers/scsi/sd.c       | 11 +++++-
 4 files changed, 108 insertions(+), 1 deletion(-)

-- 
2.52.0



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-12-01 18:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-26 16:35 [PATCH 0/4] block: add IOC_PR_READ_KEYS and IOC_PR_READ_RESERVATION ioctls Stefan Hajnoczi
2025-11-26 16:35 ` [PATCH 1/4] scsi: sd: reject invalid pr_read_keys() num_keys values Stefan Hajnoczi
2025-11-27  6:59   ` Hannes Reinecke
2025-11-26 16:35 ` [PATCH 2/4] nvme: " Stefan Hajnoczi
2025-11-27  7:02   ` Hannes Reinecke
2025-11-26 16:35 ` [PATCH 3/4] block: add IOC_PR_READ_KEYS ioctl Stefan Hajnoczi
2025-11-26 18:06   ` kernel test robot
2025-11-27  7:07   ` Hannes Reinecke
2025-11-29 14:32     ` Krzysztof Kozlowski
2025-12-01 15:06       ` Stefan Hajnoczi
2025-12-01 16:26         ` Krzysztof Kozlowski
2025-12-01 18:36           ` Stefan Hajnoczi
2025-12-01 15:14       ` Stefan Hajnoczi
2025-12-01 16:27         ` Krzysztof Kozlowski
2025-11-29 14:31   ` Krzysztof Kozlowski
2025-11-26 16:36 ` [PATCH 4/4] block: add IOC_PR_READ_RESERVATION ioctl Stefan Hajnoczi
2025-11-27  7:07   ` Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox