提交 feb4cc9b 编写于 作者: S Sage Weil

ceph: re-request max_size if cap auth changes

If the auth cap migrates to another MDS, clear requested_max_size so that
we resend any pending max_size increase requests.  This fixes potential
hangs on writes that extend a file and race with an cap migration between
MDSs.
Signed-off-by: NSage Weil <sage@newdream.net>
上级 912a9b03
...@@ -2689,6 +2689,11 @@ static void handle_cap_import(struct ceph_mds_client *mdsc, ...@@ -2689,6 +2689,11 @@ static void handle_cap_import(struct ceph_mds_client *mdsc,
NULL /* no caps context */); NULL /* no caps context */);
try_flush_caps(inode, session, NULL); try_flush_caps(inode, session, NULL);
up_read(&mdsc->snap_rwsem); up_read(&mdsc->snap_rwsem);
/* make sure we re-request max_size, if necessary */
spin_lock(&inode->i_lock);
ci->i_requested_max_size = 0;
spin_unlock(&inode->i_lock);
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册