def __collect_garbage(self): # {{{3
    if self.gc_enabled and not self.read_only:
      start_time = time.time()
      self.logger.info("Performing garbage collection (this might take a while) ..")
      self.should_vacuum = False
      for method in self.__collect_strings, self.__collect_inodes, \
          self.__collect_indices, self.__collect_blocks, self.__vacuum_metastore:
        sub_start_time = time.time()
        msg = method()
        if msg:
          elapsed_time = time.time() - sub_start_time
          self.logger.info(msg, format_timespan(elapsed_time))
      elapsed_time = time.time() - start_time
      self.logger.info("Finished garbage collection in %s.", format_timespan(elapsed_time))
dataset/ETHPy150Open xolox/dedupfs/dedupfs.py/DedupFS.__collect_garbage/original