Skip to content

Commit

Permalink
Merge PR #43322 into master
Browse files Browse the repository at this point in the history
* refs/pull/43322/head:
	mgr/volumes/fs: add extra blank line

Reviewed-by: Varsha Rao <rvarsha016@gmail.com>
  • Loading branch information
batrick committed Sep 30, 2021
2 parents 33bcd2e + d205e6a commit 8031dee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pybind/mgr/volumes/fs/purge_queue.py
Expand Up @@ -16,6 +16,7 @@

log = logging.getLogger(__name__)


# helper for fetching a trash entry for a given volume
def get_trash_entry_for_volume(fs_client, volspec, volname, running_jobs):
log.debug("fetching trash entry for volume '{0}'".format(volname))
Expand All @@ -34,6 +35,7 @@ def get_trash_entry_for_volume(fs_client, volspec, volname, running_jobs):
log.error("error fetching trash entry for volume '{0}' ({1})".format(volname, ve))
return ve.errno, None


def subvolume_purge(fs_client, volspec, volname, trashcan, subvolume_trash_entry, should_cancel):
groupname, subvolname = resolve_trash(volspec, subvolume_trash_entry.decode('utf-8'))
log.debug("subvolume resolved to {0}/{1}".format(groupname, subvolname))
Expand All @@ -53,6 +55,7 @@ def subvolume_purge(fs_client, volspec, volname, trashcan, subvolume_trash_entry
if not ve.errno == -errno.ENOENT:
raise


# helper for starting a purge operation on a trash entry
def purge_trash_entry_for_volume(fs_client, volspec, volname, purge_entry, should_cancel):
log.debug("purging trash entry '{0}' for volume '{1}'".format(purge_entry, volname))
Expand Down Expand Up @@ -90,6 +93,7 @@ def purge_trash_entry_for_volume(fs_client, volspec, volname, purge_entry, shoul
ret = ve.errno
return ret


class ThreadPoolPurgeQueueMixin(AsyncJobs):
"""
Purge queue mixin class maintaining a pool of threads for purging trash entries.
Expand Down

0 comments on commit 8031dee

Please sign in to comment.