aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/uapi/linux/sed-opal.h
diff options
context:
space:
mode:
authorJonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>2019-05-21 22:46:44 +0200
committerJens Axboe <axboe@kernel.dk>2019-06-29 10:31:33 -0600
commitc9888443413e4e06013e482fc484dbb9c559c145 (patch)
tree80a5698e6cf15049f1464ad6b305da731a7aed70 /include/uapi/linux/sed-opal.h
parentblock: never take page references for ITER_BVEC (diff)
downloadwireguard-linux-c9888443413e4e06013e482fc484dbb9c559c145.tar.xz
wireguard-linux-c9888443413e4e06013e482fc484dbb9c559c145.zip
block: sed-opal: add ioctl for done-mark of shadow mbr
Enable users to mark the shadow mbr as done without completely deactivating the shadow mbr feature. This may be useful on reboots, when the power to the disk is not disconnected in between and the shadow mbr stores the required boot files. Of course, this saves also the (few) commands required to enable the feature if it is already enabled and one only wants to mark the shadow mbr as done. Co-authored-by: David Kozub <zub@linux.fjfi.cvut.cz> Signed-off-by: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de> Signed-off-by: David Kozub <zub@linux.fjfi.cvut.cz> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed by: Scott Bauer <sbauer@plzdonthack.me> Reviewed-by: Jon Derrick <jonathan.derrick@intel.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi/linux/sed-opal.h')
-rw-r--r--include/uapi/linux/sed-opal.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/uapi/linux/sed-opal.h b/include/uapi/linux/sed-opal.h
index 7a03e5b4df6e..5681f55d334b 100644
--- a/include/uapi/linux/sed-opal.h
+++ b/include/uapi/linux/sed-opal.h
@@ -20,6 +20,11 @@ enum opal_mbr {
OPAL_MBR_DISABLE = 0x01,
};
+enum opal_mbr_done_flag {
+ OPAL_MBR_NOT_DONE = 0x0,
+ OPAL_MBR_DONE = 0x01
+};
+
enum opal_user {
OPAL_ADMIN1 = 0x0,
OPAL_USER1 = 0x01,
@@ -95,6 +100,12 @@ struct opal_mbr_data {
__u8 __align[7];
};
+struct opal_mbr_done {
+ struct opal_key key;
+ __u8 done_flag;
+ __u8 __align[7];
+};
+
#define IOC_OPAL_SAVE _IOW('p', 220, struct opal_lock_unlock)
#define IOC_OPAL_LOCK_UNLOCK _IOW('p', 221, struct opal_lock_unlock)
#define IOC_OPAL_TAKE_OWNERSHIP _IOW('p', 222, struct opal_key)
@@ -108,5 +119,6 @@ struct opal_mbr_data {
#define IOC_OPAL_ERASE_LR _IOW('p', 230, struct opal_session_info)
#define IOC_OPAL_SECURE_ERASE_LR _IOW('p', 231, struct opal_session_info)
#define IOC_OPAL_PSID_REVERT_TPR _IOW('p', 232, struct opal_key)
+#define IOC_OPAL_MBR_DONE _IOW('p', 233, struct opal_mbr_done)
#endif /* _UAPI_SED_OPAL_H */