]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: keep inode multiversion if it has snapped old_inodes
authorSage Weil <sage@newdream.net>
Thu, 13 Nov 2008 19:06:03 +0000 (11:06 -0800)
committerSage Weil <sage@newdream.net>
Thu, 13 Nov 2008 20:45:37 +0000 (12:45 -0800)
Once old_inodes gets cleaned out (snaps deleted), we can return
to normalcy.

src/mds/CInode.h

index 307e490c56d33eaca50fad726901d2ee8d93afe0..1881099dd3bdd1114ec181e0c05c127b8a229b45 100644 (file)
@@ -147,7 +147,8 @@ class CInode : public MDSCacheObject {
   bool is_multiversion() {
     return snaprealm ||  // other snaprealms will link to me
       inode.is_dir() ||  // links to me in other snaps
-      inode.nlink > 1;   // there are remote links, possibly snapped, that will need to find me
+      inode.nlink > 1 || // there are remote links, possibly snapped, that will need to find me
+      old_inodes.size(); // once multiversion, always multiversion.  until old_inodes gets cleaned out.
   }
   snapid_t get_oldest_snap();