]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG::mark_clean(): queue_snap_trim if snap_trimq is not empty
authorSamuel Just <sam.just@inktank.com>
Mon, 30 Jul 2012 20:38:08 +0000 (13:38 -0700)
committerSamuel Just <sam.just@inktank.com>
Mon, 30 Jul 2012 20:39:00 +0000 (13:39 -0700)
Currently, we won't queue for snap trim until the next map
update.

Noticed while reviewing another patch, this would result in
snaps not being trimmed until the next map update.

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc

index 64760e094682686f38a470ccdb0d82b8d88d8bd3..16b118256cf6fff572723db8426d938df1068e2c 100644 (file)
@@ -1688,6 +1688,9 @@ void PG::mark_clean()
 
   trim_past_intervals();
 
+  if (is_clean() && !snap_trimq.empty())
+    queue_snap_trim();
+
   dirty_info = true;
 }