osd: fix transition from snaps -> no snaps -> snaps
After filestore btrfs snaps = 1 -> 0, we may have leftover snap dirs. Later, if we turn them back on again, we'll roll back to a horribly ancient state.
#3 Updated by Sage Weil about 9 years ago
I think all we need to do is look at current/commit_op_seq. If it is greater than the newest snap, than that snap is stale, because someone went and committed to current/.
An optional arg --osd-use-stale-snap bool would override that. That way you could still manually roll back to an older snap (by, say, deleting/renaming the newest) if you needed to for some reason.