Whamcloud - gitweb
LU-2665 mdc: Keep resend FLocks
authorBruno Faccini <bruno.faccini@intel.com>
Wed, 22 May 2013 09:50:03 +0000 (11:50 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 19 Nov 2013 23:00:03 +0000 (08:00 +0900)
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 <bruno.faccini@intel.com>
Change-Id: I8faa331712abeadee46eabe111ee1c23a05840d5
Reviewed-on: http://review.whamcloud.com/6415
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdc/mdc_locks.c

index 0fad743..22c0b02 100644 (file)
@@ -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);
         }