Bug #54463
Updated by Xiubo Li about 2 years ago
In _do_cap_update() if one client is releasing If the Fw caps file's size changes to 0 we also need to flush the mdlog, relevant client range will be erased, and then new_max will be 0. It will skip flushing the mdlog after because it submitting a journal log, which will keep holding hold the wrlock wr lock for the filelock. So filelock when a new writing journal and when another client is trying to open the file for reading, since the wrlock is locked for the filelock the file_eval() is possibly couldn't changing the lock state and at the same time if the filelock is in stable state, such as in EXECL, MIX. The mds it may skip flushing the mdlog in the open related code too. We need to flush wait until the mdlog if there still has any wanted caps couldn't be satisfied and has any lock for the filelock after the file_eval(). gets flushed, which is at most 5 seconds later.