From 6b1f13fd0f6f339c1ceb03a3819ae2e780e78cff Mon Sep 17 00:00:00 2001 From: Ondrej Kozina Date: Mon, 18 Dec 2023 10:27:36 +0100 Subject: [PATCH] opal: add comments to all lockless opal calls. --- lib/luks2/hw_opal/hw_opal.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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,