]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: 'follows' is snap_context seq
authorSage Weil <sage@newdream.net>
Tue, 5 Aug 2008 23:59:16 +0000 (16:59 -0700)
committerSage Weil <sage@newdream.net>
Tue, 5 Aug 2008 23:59:16 +0000 (16:59 -0700)
src/client/Client.cc
src/client/Client.h

index cd983c95a69000106e4b40791a1d0a446476bdf4..3e7b865937cce598c5c6b57003634c02f4a0c365 100644 (file)
@@ -1460,7 +1460,7 @@ void Client::check_caps(Inode *in, bool flush_snap)
     in->reported_size = in->inode.size;
     m->set_max_size(in->wanted_max_size);
     in->requested_max_size = in->wanted_max_size;
-    m->set_snap_follows(in->snaprealm->get_follows());
+    m->set_snap_follows(in->snaprealm->get_snap_context().seq);
     messenger->send_message(m, mdsmap->get_inst(it->first));
     if (wanted == 0 && !flush_snap)
       mds_sessions[it->first].num_caps--;
@@ -2025,7 +2025,7 @@ void Client::handle_file_caps(MClientFileCaps *m)
       m->set_mtime(in->inode.mtime);
       m->set_atime(in->inode.atime);
       m->set_wanted(wanted);
-      m->set_snap_follows(in->snaprealm->get_follows());
+      m->set_snap_follows(in->snaprealm->get_snap_context().seq);
       m->set_migrate_seq(cap->mseq);
     }
   } else if (old_caps == new_caps) {
index 39e2817c8aae8addabc0f7c5ae6591684babad30..250b2801e88e2ddfa8d5f1807c327d320e7e0f0a 100644 (file)
@@ -148,12 +148,6 @@ struct SnapRealm {
       build_snap_context();
     return cached_snap_context;
   }
-  snapid_t get_follows() {
-    get_snap_context();
-    if (cached_snap_context.empty())
-      return 0;
-    return cached_snap_context.snaps[0];
-  }
 };
 
 inline ostream& operator<<(ostream& out, const SnapRealm& r) {