Skip to content

Commit f33bb08

Browse files
committed
librbd: don't use public API flags in Group::snap_create()
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 <[email protected]>
1 parent b91ab48 commit f33bb08

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/librbd/api/Group.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -922,8 +922,6 @@ int Group<I>::snap_create(librados::IoCtx& group_ioctx,
922922
if (r < 0) {
923923
return r;
924924
}
925-
internal_flags &= ~(SNAP_CREATE_FLAG_SKIP_NOTIFY_QUIESCE |
926-
SNAP_CREATE_FLAG_IGNORE_NOTIFY_QUIESCE_ERROR);
927925

928926
r = cls_client::dir_get_id(&group_ioctx, RBD_GROUP_DIRECTORY, group_name,
929927
&group_id);
@@ -1012,10 +1010,11 @@ int Group<I>::snap_create(librados::IoCtx& group_ioctx,
10121010
goto remove_record;
10131011
}
10141012

1015-
if ((flags & RBD_SNAP_CREATE_SKIP_QUIESCE) == 0) {
1013+
if ((internal_flags & SNAP_CREATE_FLAG_SKIP_NOTIFY_QUIESCE) == 0) {
10161014
ldout(cct, 20) << "Sending quiesce notification" << dendl;
10171015
ret_code = notify_quiesce(ictxs, prog_ctx, &quiesce_requests);
1018-
if (ret_code != 0 && (flags & RBD_SNAP_CREATE_IGNORE_QUIESCE_ERROR) == 0) {
1016+
if (ret_code != 0 &&
1017+
(internal_flags & SNAP_CREATE_FLAG_IGNORE_NOTIFY_QUIESCE_ERROR) == 0) {
10191018
goto remove_record;
10201019
}
10211020
}

0 commit comments

Comments
 (0)