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: Sage Weil <sage@newdream.net>

Sage Weil feb4cc9b 912a9b03

+5
+5
fs/ceph/caps.c
··· 2689 NULL /* no caps context */); 2690 try_flush_caps(inode, session, NULL); 2691 up_read(&mdsc->snap_rwsem); 2692 } 2693 2694 /*
··· 2689 NULL /* no caps context */); 2690 try_flush_caps(inode, session, NULL); 2691 up_read(&mdsc->snap_rwsem); 2692 + 2693 + /* make sure we re-request max_size, if necessary */ 2694 + spin_lock(&inode->i_lock); 2695 + ci->i_requested_max_size = 0; 2696 + spin_unlock(&inode->i_lock); 2697 } 2698 2699 /*