Commit 9bccb765 authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov

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: default avatar"Yan, Zheng" <zyan@redhat.com>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 0aa971b6
...@@ -2833,6 +2833,11 @@ int ceph_get_caps(struct file *filp, int need, int want, ...@@ -2833,6 +2833,11 @@ int ceph_get_caps(struct file *filp, int need, int want,
} }
if (ret < 0) { if (ret < 0) {
if (ret == -EFBIG || ret == -ESTALE) {
int ret2 = ceph_wait_on_async_create(inode);
if (ret2 < 0)
return ret2;
}
if (ret == -EFBIG) { if (ret == -EFBIG) {
check_max_size(inode, endoff); check_max_size(inode, endoff);
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment