Skip to content

Commit 6ae0024

Browse files
author
neeraj pratap singh
committed
mgr/vol : shortening the name of function
Fixes: https://tracker.ceph.com/issues/66815 Introduced by:ceph#55838 (comment) Signed-off-by: Neeraj Pratap Singh <[email protected]>
1 parent 423a086 commit 6ae0024

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/pybind/mgr/volumes/fs/operations/versions/metadata_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def list_all_options_from_section(self, section):
172172
metadata_dict[option] = self.config.get(section,option)
173173
return metadata_dict
174174

175-
def list_all_keys_with_specified_values_from_section(self, section, value):
175+
def filter_keys(self, section, value):
176176
keys = []
177177
if self.config.has_section(section):
178178
options = self.config.options(section)

src/pybind/mgr/volumes/fs/operations/versions/subvolume_v1.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ def get_pending_clones(self, snapname):
752752

753753
try:
754754
if self.has_pending_clones(snapname):
755-
pending_track_id_list = self.metadata_mgr.list_all_keys_with_specified_values_from_section('clone snaps', snapname)
755+
pending_track_id_list = self.metadata_mgr.filter_keys('clone snaps', snapname)
756756
else:
757757
return pending_clones_info
758758
except MetadataMgrException as me:
@@ -774,9 +774,9 @@ def get_pending_clones(self, snapname):
774774
raise VolumeException(-e.args[0], e.args[1])
775775
else:
776776
try:
777-
# If clone is completed between 'list_all_keys_with_specified_values_from_section'
778-
# and readlink(track_id_path) call then readlink will fail with error ENOENT (2)
779-
# Hence we double check whether track_id is exist in .meta file or not.
777+
# If clone is completed between 'filter_keys' and readlink(track_id_path) call
778+
# then readlink will fail with error ENOENT (2). Hence we double check whether
779+
# track_id exists in .meta file or not.
780780
# Edge case scenario.
781781
# If track_id for clone exist but path /volumes/_index/clone/{track_id} not found
782782
# then clone is orphan.

0 commit comments

Comments
 (0)