Skip to content

Commit

Permalink
ceph: rename unsafe_request_wait()
Browse files Browse the repository at this point in the history
Rename it to flush_mdlog_and_wait_inode_unsafe_requests() to make
it more descriptive.

Signed-off-by: Xiubo Li <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
  • Loading branch information
lxbsz authored and idryomov committed May 25, 2022
1 parent d9d58f0 commit ae06706
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -2219,9 +2219,9 @@ static int caps_are_flushed(struct inode *inode, u64 flush_tid)
}

/*
* wait for any unsafe requests to complete.
* flush the mdlog and wait for any unsafe requests to complete.
*/
static int unsafe_request_wait(struct inode *inode)
static int flush_mdlog_and_wait_inode_unsafe_requests(struct inode *inode)
{
struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc;
struct ceph_inode_info *ci = ceph_inode(inode);
Expand Down Expand Up @@ -2337,7 +2337,7 @@ static int unsafe_request_wait(struct inode *inode)
kfree(sessions);
}

dout("unsafe_request_wait %p wait on tid %llu %llu\n",
dout("%s %p wait on tid %llu %llu\n", __func__,
inode, req1 ? req1->r_tid : 0ULL, req2 ? req2->r_tid : 0ULL);
if (req1) {
ret = !wait_for_completion_timeout(&req1->r_safe_completion,
Expand Down Expand Up @@ -2381,7 +2381,7 @@ int ceph_fsync(struct file *file, loff_t start, loff_t end, int datasync)
dirty = try_flush_caps(inode, &flush_tid);
dout("fsync dirty caps are %s\n", ceph_cap_string(dirty));

err = unsafe_request_wait(inode);
err = flush_mdlog_and_wait_inode_unsafe_requests(inode);

/*
* only wait on non-file metadata writeback (the mds
Expand Down

0 comments on commit ae06706

Please sign in to comment.