]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix up snap cap issue logic comments
authorSage Weil <sage@newdream.net>
Fri, 9 Jul 2010 17:39:11 +0000 (10:39 -0700)
committerSage Weil <sage@newdream.net>
Fri, 9 Jul 2010 21:47:21 +0000 (14:47 -0700)
src/mds/CInode.cc

index 3f3c494e505aa9f8a453c5423193be1f15228bcb..81098ae208589864237e64999503df83f62f976a 100644 (file)
@@ -1752,10 +1752,14 @@ int CInode::encode_inodestat(bufferlist& bl, Session *session,
   // encode caps
   if (snapid != CEPH_NOSNAP) {
     /*
-     * snapped inodes (files or dirs) only get read-only caps.  if
-     * there is a Capability on the inode (either it's a dir, or it's
-     * a file with a flushing cap), then limit caps issued to what is
-     * already on teh cap.
+     * snapped inodes (files or dirs) only get read-only caps.  always
+     * issue everything possible, since it is read only.
+     *
+     * if a snapped inode has caps, limit issued caps based on the
+     * lock state.
+     *
+     * if it is a live inode, limit issued caps based on the lock
+     * state.
      *
      * do NOT adjust cap issued state, because the client always
      * tracks caps per-snap and the mds does either per-interval or