projects
/
bluesky.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
37739cc
)
Add cleaner option to rewrite and compact all inodes (but not all data).
author
Michael Vrable
<mvrable@cs.ucsd.edu>
Sun, 19 Sep 2010 18:31:15 +0000
(11:31 -0700)
committer
Michael Vrable
<mvrable@cs.ucsd.edu>
Sun, 19 Sep 2010 18:31:15 +0000
(11:31 -0700)
cleaner/cleaner
patch
|
blob
|
history
diff --git
a/cleaner/cleaner
b/cleaner/cleaner
index
1e564e8
..
58292e4
100755
(executable)
--- a/
cleaner/cleaner
+++ b/
cleaner/cleaner
@@
-401,7
+401,7
@@
def rewrite_inode(backend, inode_map, inum, log, copy_data=True):
log.write(inode, 1)
inode_map.mark_updated(inum)
log.write(inode, 1)
inode_map.mark_updated(inum)
-def run_cleaner(backend, inode_map, log):
+def run_cleaner(backend, inode_map, log
, repack_inodes=False
):
# Determine which segments are poorly utilized and should be cleaned. We
# need better heuristics here.
for (s, u) in sorted(inode_map.util.segments.items()):
# Determine which segments are poorly utilized and should be cleaned. We
# need better heuristics here.
for (s, u) in sorted(inode_map.util.segments.items()):
@@
-416,7
+416,10
@@
def run_cleaner(backend, inode_map, log):
# Given that list of segments to clean, scan through those segments to find
# data which is still live and mark relevant inodes as needing to be
# rewritten.
# Given that list of segments to clean, scan through those segments to find
# data which is still live and mark relevant inodes as needing to be
# rewritten.
- dirty_inodes = set()
+ if repack_inodes:
+ dirty_inodes = set(inode_map.inodes)
+ else:
+ dirty_inodes = set()
dirty_inode_data = set()
for s in inode_map.obsolete_segments:
filename = backend.loc_to_name(s)
dirty_inode_data = set()
for s in inode_map.obsolete_segments:
filename = backend.loc_to_name(s)