From: Bruno Faccini Date: Wed, 22 May 2013 09:50:03 +0000 (+0200) Subject: LU-2665 mdc: Keep resend FLocks X-Git-Tag: 2.4.1-RC1~66 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=5e9646ded8a35f1f0b7f3f1eadbd8ab4d927c4a5;p=fs%2Flustre-release.git LU-2665 mdc: Keep resend FLocks FLocks requests (particulary F_UNLCKs) can't be trashed upon comm problems with Server/MDS nor upon kill/exit, thus we need to keep retry/send. Signed-off-by: Bruno Faccini Change-Id: I8faa331712abeadee46eabe111ee1c23a05840d5 Reviewed-on: http://review.whamcloud.com/6415 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin --- diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 479a832..74112fb 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -829,7 +829,13 @@ resend: /* For flock requests we immediatelly return without further delay and let caller deal with the rest, since rest of this function metadata processing makes no sense for flock - requests anyway */ + requests anyway. But in case of problem during comms with + Server (ETIMEDOUT) or any signal/kill attempt (EINTR), we + can not rely on caller and this mainly for F_UNLCKs + (explicits or automatically generated by Kernel to clean + current FLocks upon exit) that can't be trashed */ + if ((rc == -EINTR) || (rc == -ETIMEDOUT)) + goto resend; RETURN(rc); }