]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: check max size on truncate, in case we truncate forward
authorSage Weil <sage@newdream.net>
Thu, 1 May 2008 19:54:53 +0000 (12:54 -0700)
committerSage Weil <sage@newdream.net>
Thu, 1 May 2008 19:54:53 +0000 (12:54 -0700)
src/mds/Locker.cc
src/mds/Server.cc

index a7c9a546a524af06cf1683e200afe6df7920c24f..d461248462135ec89fd3af566525e11773c9522e 100644 (file)
@@ -632,6 +632,10 @@ void Locker::issue_truncate(CInode *in)
                                                 cap->wanted()),
                             it->first);
   }
+
+  // should we increase max_size?
+  if (in->is_auth() && !in->is_dir())
+    check_inode_max_size(in);
 }
 
 void Locker::revoke_stale_caps(Session *session)
index 64da9644b4bebe9442d0485a485d8379459c195a..cca420fd5c2754d6a4f0a4f36b7c49b60e017d58 100644 (file)
@@ -4059,6 +4059,9 @@ public:
     in->inode.mtime = ctime;
     in->pop_and_dirty_projected_inode(mdr->ls);
     
+    // notify any clients
+    mds->locker->issue_truncate(in);
+
     // hit pop
     mds->balancer->hit_inode(mdr->now, in, META_POP_IWR);