aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Kozina <okozina@redhat.com>2023-12-18 10:27:36 +0100
committerMilan Broz <gmazyland@gmail.com>2023-12-18 17:26:47 +0000
commit6b1f13fd0f6f339c1ceb03a3819ae2e780e78cff (patch)
tree66008166cf7026b5dd076da59637d863c32917a2
parent7db221e47e691c6a411637228934e9edec775dc8 (diff)
downloadcryptsetup-6b1f13fd0f6f339c1ceb03a3819ae2e780e78cff.tar.gz
opal: add comments to all lockless opal calls.
-rw-r--r--lib/luks2/hw_opal/hw_opal.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/luks2/hw_opal/hw_opal.c b/lib/luks2/hw_opal/hw_opal.c
index e40d138e..c5591aba 100644
--- a/lib/luks2/hw_opal/hw_opal.c
+++ b/lib/luks2/hw_opal/hw_opal.c
@@ -768,6 +768,11 @@ int opal_unlock(struct crypt_device *cd,
return opal_lock_unlock(cd, dev, segment_number, vk, /* lock= */ false);
}
+/*
+ * It does not require opal lock. This completely destroys
+ * data on whole OPAL block device. Serialization does not
+ * make sense here.
+ */
int opal_factory_reset(struct crypt_device *cd,
struct device *dev,
const char *password,
@@ -898,11 +903,17 @@ out:
return r;
}
+/*
+ * Does not require opal lock (immutable).
+ */
int opal_supported(struct crypt_device *cd, struct device *dev)
{
return opal_query_status(cd, dev, OPAL_FL_SUPPORTED|OPAL_FL_LOCKING_SUPPORTED);
}
+/*
+ * Does not require opal lock (immutable).
+ */
int opal_geometry(struct crypt_device *cd,
struct device *dev,
bool *ret_align,