]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: don't improperly conclude COMPLETE on empty dir
authorSage Weil <sage@newdream.net>
Tue, 24 Aug 2010 23:31:19 +0000 (16:31 -0700)
committerSage Weil <sage@newdream.net>
Tue, 24 Aug 2010 23:31:19 +0000 (16:31 -0700)
We can't trust the MDS values when we hold FILE_EXCL.

src/client/Client.cc

index ba4f1d6a2f720a808b9b1e0e2e9ffeb60ae801d9..239752f80c814bb3ab0a1ae11bb94f35de1a869d 100644 (file)
@@ -492,6 +492,7 @@ Inode * Client::add_update_inode(InodeStat *st, utime_t from, int mds)
   
   if (in->is_dir() &&
       (st->cap.caps & CEPH_CAP_FILE_SHARED) &&
+      (issued & CEPH_CAP_FILE_EXCL) == 0 &&
       in->dirstat.nfiles == 0 &&
       in->dirstat.nsubdirs == 0) {
     dout(10) << " marking I_COMPLETE on empty dir " << *in << dendl;