From 68b5da9e10bd92a46ca088325f1e0357872de82e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 19 Nov 2009 11:24:48 -0800 Subject: [PATCH] mds: don't change directory size/rbytes from client cap update This is wrong, and screws up the recursive accounting. --- src/mds/Locker.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index ea35d05e3a946..179afbef195c0 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -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; -- 2.39.5