From 2130ea485b59440094afd142d324cd54b94bda98 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Wed, 9 Nov 2016 09:36:06 -0500 Subject: [PATCH] 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 --- src/client/Client.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 26c2b78ed0355..8d900d15cfc79 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; -- 2.39.5