Skip to content

Commit b1d5705

Browse files
authored
Merge pull request ceph#58292 from neesingh-rh/wip-vol-method-name-change
mgr/vol : shortening the name of helper method Reviewed-by: Venky Shankar <[email protected]> Reviewed-by: Rishabh Dave <[email protected]>
2 parents 6e72881 + 6ae0024 commit b1d5705

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
@@ -758,7 +758,7 @@ def get_pending_clones(self, snapname):
758758

759759
try:
760760
if self.has_pending_clones(snapname):
761-
pending_track_id_list = self.metadata_mgr.list_all_keys_with_specified_values_from_section('clone snaps', snapname)
761+
pending_track_id_list = self.metadata_mgr.filter_keys('clone snaps', snapname)
762762
else:
763763
return pending_clones_info
764764
except MetadataMgrException as me:
@@ -780,9 +780,9 @@ def get_pending_clones(self, snapname):
780780
raise VolumeException(-e.args[0], e.args[1])
781781
else:
782782
try:
783-
# If clone is completed between 'list_all_keys_with_specified_values_from_section'
784-
# and readlink(track_id_path) call then readlink will fail with error ENOENT (2)
785-
# Hence we double check whether track_id is exist in .meta file or not.
783+
# If clone is completed between 'filter_keys' and readlink(track_id_path) call
784+
# then readlink will fail with error ENOENT (2). Hence we double check whether
785+
# track_id exists in .meta file or not.
786786
# Edge case scenario.
787787
# If track_id for clone exist but path /volumes/_index/clone/{track_id} not found
788788
# then clone is orphan.

0 commit comments

Comments
 (0)