Skip to content

Commit 9bccb76

Browse files
ukernelidryomov
authored andcommitted
ceph: wait for async creating inode before requesting new max size
ceph_check_caps() can't request new max size for async creating inode. This may make ceph_get_caps() loop busily until getting reply of the async create. Also, wait for async creating reply before calling ceph_renew_caps(). Signed-off-by: "Yan, Zheng" <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 0aa971b commit 9bccb76

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

fs/ceph/caps.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2833,6 +2833,11 @@ int ceph_get_caps(struct file *filp, int need, int want,
28332833
}
28342834

28352835
if (ret < 0) {
2836+
if (ret == -EFBIG || ret == -ESTALE) {
2837+
int ret2 = ceph_wait_on_async_create(inode);
2838+
if (ret2 < 0)
2839+
return ret2;
2840+
}
28362841
if (ret == -EFBIG) {
28372842
check_max_size(inode, endoff);
28382843
continue;

0 commit comments

Comments
 (0)