]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: define must renew lock flag
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 22 Feb 2021 03:19:25 +0000 (19:19 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 22 Mar 2021 17:14:01 +0000 (10:14 -0700)
This flag already exists in cls_lock but was not made externally
available via librados. Additionally, internally cls_lock refers to the
_RENEW flag as _MAY_RENEW, add an alias for librados to match.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit d3d683427d98b62d9b9974e455243bebe5119b53)

src/include/rados/librados.h

index 5df8f99fe111fc859b95f104af26052d8443c1a7..96de0661bb05dfaf33e88d72c361ab169ae19efd 100644 (file)
@@ -55,7 +55,9 @@ extern "C" {
 /* RADOS lock flags
  * They are also defined in cls_lock_types.h. Keep them in sync!
  */
-#define LIBRADOS_LOCK_FLAG_RENEW 0x1
+#define LIBRADOS_LOCK_FLAG_RENEW       (1u<<0)
+#define LIBRADOS_LOCK_FLAG_MAY_RENEW   LIBRADOS_LOCK_FLAG_RENEW
+#define LIBRADOS_LOCK_FLAG_MUST_RENEW  (1u<<1)
 
 /*
  * Constants for rados_write_op_create().