]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: sync metadata even when just write caps are dirty
authorJeff Layton <jlayton@redhat.com>
Wed, 9 Nov 2016 14:36:06 +0000 (09:36 -0500)
committerJeff Layton <jlayton@redhat.com>
Wed, 9 Nov 2016 14:36:06 +0000 (09:36 -0500)
We still need to sync out metadata on size and mtime changes, and we
definitely do not want to delay syncing just because we only have
write caps that are dirty. Remove the mask and check_caps whenever
any caps are dirty.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/client/Client.cc

index 26c2b78ed03553c50e6039de6edeafd242d3f8cd..8d900d15cfc7997aa80a1b0bd67c820e2f133634 100644 (file)
@@ -9033,7 +9033,7 @@ int Client::_fsync(Inode *in, bool syncdataonly)
     ldout(cct, 15) << "using return-valued form of _fsync" << dendl;
   }
   
-  if (!syncdataonly && (in->dirty_caps & ~CEPH_CAP_ANY_FILE_WR)) {
+  if (!syncdataonly && in->dirty_caps) {
     check_caps(in, true);
     if (in->flushing_caps)
       flush_tid = last_flush_tid;