]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: don't use public API flags in Group::snap_create() 62962/head
authorIlya Dryomov <idryomov@gmail.com>
Fri, 21 Mar 2025 13:49:44 +0000 (14:49 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 25 Apr 2025 07:08:13 +0000 (09:08 +0200)
Use internal flags obtained from snap_create_flags_api_to_internal()
instead -- internal_flags variable was assigned but not used.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit f33bb0802e45966e794ec60454578df80dac41f6)

src/librbd/api/Group.cc

index da0dba4a6405ce5acacbc530fe9605838b70318b..9ce7e033ef81ea222748f3a213dfac1308b14a6a 100644 (file)
@@ -885,8 +885,6 @@ int Group<I>::snap_create(librados::IoCtx& group_ioctx,
   if (r < 0) {
     return r;
   }
-  internal_flags &= ~(SNAP_CREATE_FLAG_SKIP_NOTIFY_QUIESCE |
-                      SNAP_CREATE_FLAG_IGNORE_NOTIFY_QUIESCE_ERROR);
 
   r = cls_client::dir_get_id(&group_ioctx, RBD_GROUP_DIRECTORY, group_name,
                              &group_id);
@@ -975,10 +973,11 @@ int Group<I>::snap_create(librados::IoCtx& group_ioctx,
     goto remove_record;
   }
 
-  if ((flags & RBD_SNAP_CREATE_SKIP_QUIESCE) == 0) {
+  if ((internal_flags & SNAP_CREATE_FLAG_SKIP_NOTIFY_QUIESCE) == 0) {
     ldout(cct, 20) << "Sending quiesce notification" << dendl;
     ret_code = notify_quiesce(ictxs, prog_ctx, &quiesce_requests);
-    if (ret_code != 0 && (flags & RBD_SNAP_CREATE_IGNORE_QUIESCE_ERROR) == 0) {
+    if (ret_code != 0 &&
+        (internal_flags & SNAP_CREATE_FLAG_IGNORE_NOTIFY_QUIESCE_ERROR) == 0) {
       goto remove_record;
     }
   }