]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
client: fix lazyio_synchronize() to update file size
authorSidharth Anupkrishnan <sanupkri@redhat.com>
Fri, 16 Aug 2019 11:13:12 +0000 (16:43 +0530)
committerSidharth Anupkrishnan <sanupkri@redhat.com>
Thu, 29 Aug 2019 13:11:43 +0000 (18:41 +0530)
Signed-off-by: Sidharth Anupkrishnan <sanupkri@redhat.com>
src/client/Client.cc

index 7210b745420e3bcb819ae251c9641234aa955963..6ac441874136397b1add05ee6b2c970b86e52f41 100644 (file)
@@ -10512,8 +10512,11 @@ int Client::lazyio_synchronize(int fd, loff_t offset, size_t count)
   Inode *in = f->inode.get();
   
   _fsync(f, true);
-  if (_release(in))
-    check_caps(in, 0);
+  if (_release(in)) {
+    int r =_getattr(in, CEPH_STAT_CAP_SIZE, f->actor_perms);
+    if (r < 0) 
+      return r;
+  }
   return 0;
 }