junneyang / zumastor

Automatically exported from code.google.com/p/zumastor
0 stars 1 forks source link

ddsnap auto_delete code skips zero-usecount squashed snapshot #113

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When ddsnap reaches 64 maximum snapshot limit and tries to find a victim to
delete, it skips all of the squashed snapshots. The problem is because the
auto_delete_snapshot is called at two places: one to free snapshot spaces
and one to reduce the number of snapshots. The first case should skip
squashed snapshots because their space have already been freed, but the
second case should not skip those squashed snapshots that have zero usecounts.

In the attachment is a patch to fix the problem. We may want to get it in
for 0.8 since issue 24 has been deferred.

Original issue reported on code.google.com by jiayin...@gmail.com on 16 Apr 2008 at 10:04

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by jiahotc...@gmail.com on 22 Apr 2008 at 10:06

GoogleCodeExporter commented 9 years ago
with this patch, find_victim becomes too complex for anybody to understand.  
Please
just write a new routine "find_unused" that uses simpler logic.  A secondary
advantage of this approach is that it moves in the direction of getting rid of
snapshot squashing.

Original comment by Daniel.R...@gmail.com on 28 Apr 2008 at 5:33

GoogleCodeExporter commented 9 years ago
Fixed with revision 1607. The latest patch is attached.

Original comment by jiahotc...@gmail.com on 29 Apr 2008 at 4:51

Attachments: