Bug #44850
closedsync on libcephfs and wait for CEPH_CAP_OP_FLUSH_ACK
0%
Description
Opening this due to a conversation on the issue this one was copied from (https://tracker.ceph.com/issues/44744). The relevant question was raised by Luis initially:
when doing a full sync (i.e. when ->sync_fs() is executed), the client will wait for the MDS to send the CEPH_CAP_OP_FLUSH_ACK, acknowledging that everything is safe (in the journal, I believe). And this message is handled in Locker::handle_client_caps() (called from MDSRank::handle_deferrable_message), where it is queued for processing. Finally, it is later sent out to the client from Locker::file_update_finish(). And the time between being queued and sent corresponds to the delay experienced in the kernel client.
The fuse client does not wait for this FLUSH_ACK message from the MDS when 'sync' is executed. In fact, it even allows the filesystem to be umounted before receiving this ACK.
Jeff has proposed a fix to speed up the kernel client.
The question here is if libcephfs clients are actually correct in not waiting for CEPH_CAP_OP_FLUSH_ACK.
Files