From 8921a18e1641331c9294ff28e58f90054e42bffb Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 9 Jul 2010 10:39:11 -0700 Subject: [PATCH] mds: fix up snap cap issue logic comments --- src/mds/CInode.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index 3f3c494e505aa..81098ae208589 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -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 -- 2.39.5