From 35a758f905a5c1f8bfa816445219b6323d99fdb0 Mon Sep 17 00:00:00 2001 From: Bruno Faccini Date: Wed, 22 May 2013 11:50:03 +0200 Subject: [PATCH] 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 --- lustre/mdc/mdc_locks.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 0fad743..22c0b02 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); } -- 1.8.3.1