block: disallow Persistent Reservation on partitions
authorJingbo Xu <jefflexu@linux.alibaba.com>
Tue, 13 Jun 2023 08:40:07 +0000 (16:40 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 20 Jun 2023 18:49:23 +0000 (12:49 -0600)
commit12629621669b239445727256d1a5dab616b30deb
treef1aea1b4d235f0faf6a23c8b2deecec34bd7cfef
parentc576c4bf9ecfa3fb9f7b11681cc2f60aba5276c4
block: disallow Persistent Reservation on partitions

Refuse Persistent Reservation operations on partitions as reservation
on partitions doesn't make sense.

Besides, introduce blkdev_pr_allowed() helper, where more policies could
be placed here later.

Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230613084008.93795-2-jefflexu@linux.alibaba.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/ioctl.c