nvme: Add pr_ops read_reservation support
authorMike Christie <michael.christie@oracle.com>
Fri, 7 Apr 2023 20:05:46 +0000 (15:05 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 12 Apr 2023 01:55:36 +0000 (21:55 -0400)
commit28c97ba38ff9c00bc177887c2d8568b7115a44e0
tree7d5c397dd01b7b2861632fc80bdbba06e673fec2
parentbe1a7cd2d0ed028ffdd60c65e3734e2a1d8b17df
nvme: Add pr_ops read_reservation support

This patch adds support for the pr_ops read_reservation callout by
calling the NVMe Reservation Report helper. It then parses that info to
detect if there is a reservation and if there is then convert the
returned info to a pr_ops pr_held_reservation struct.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/20230407200551.12660-14-michael.christie@oracle.com
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/nvme/host/pr.c