From: Jeff Layton Date: Wed, 9 Nov 2016 14:36:06 +0000 (-0500) Subject: client: sync metadata even when just write caps are dirty X-Git-Tag: v11.1.0~333^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2130ea485b59440094afd142d324cd54b94bda98;p=ceph.git client: sync metadata even when just write caps are dirty 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 --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 26c2b78ed035..8d900d15cfc7 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -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;