mds: don't change directory size/rbytes from client cap update

This is wrong, and screws up the recursive accounting.
This commit is contained in:
Sage Weil 2009-11-19 11:24:48 -08:00
parent 8f38d0e98b
commit 68b5da9e10

View File

@ -1947,7 +1947,8 @@ bool Locker::_do_cap_update(CInode *in, Capability *cap,
<< " for " << *in << dendl;
pi->ctime = ctime;
}
if (size > latest->size) {
if (in->inode.is_file() && // ONLY if regular file
size > latest->size) {
dout(7) << " size " << pi->size << " -> " << size
<< " for " << *in << dendl;
pi->size = size;