sed-opal: Add command to read locking range parameters.
authorOndrej Kozina <okozina@redhat.com>
Wed, 5 Apr 2023 11:12:23 +0000 (13:12 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 5 Apr 2023 13:46:26 +0000 (07:46 -0600)
commit4c4dd04e75e8177311d17387326253674cb0558b
treea5c8da025b007246c52f1a5632fe3561519d9558
parentbaf82b679cb2c76eb6f4b2881a60380e328ccc79
sed-opal: Add command to read locking range parameters.

It returns following attributes:

locking range start
locking range length
read lock enabled
write lock enabled
lock state (RW, RO or LK)

It can be retrieved by user authority provided the authority
was added to locking range via prior IOC_OPAL_ADD_USR_TO_LR
ioctl command. The command was extended to add user in ACE that
allows to read attributes listed above.

Signed-off-by: Ondrej Kozina <okozina@redhat.com>
Tested-by: Luca Boccassi <bluca@debian.org>
Tested-by: Milan Broz <gmazyland@gmail.com>
Link: https://lore.kernel.org/r/20230405111223.272816-6-okozina@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/sed-opal.c
include/linux/sed-opal.h
include/uapi/linux/sed-opal.h