Whamcloud - gitweb
b=21686 fail the request if its obd_device stopping
authorroot <root@zhanghc.(none)>
Sat, 30 Jan 2010 07:02:05 +0000 (15:02 +0800)
committerJohann Lombardi <johann@sun.com>
Tue, 2 Feb 2010 10:10:56 +0000 (11:10 +0100)
in ldlm_handle_enqueue, the request should be failed
if its obd_device had been marked as "fail"(obd_fail=1),
which will be set during umount.

i=johann@sun.com
i=oleg.drokin@sun.com

lustre/ldlm/ldlm_lockd.c

index f195f04..0301daf 100644 (file)
@@ -1225,6 +1225,9 @@ existing_lock:
                 LDLM_DEBUG(lock, "server-side enqueue handler, sending reply"
                            "(err=%d, rc=%d)", err, rc);
 
+                if (rc == 0 && obddev->obd_fail)
+                        rc = -ENOTCONN;
+
                 if (rc == 0) {
                         lock_res_and_lock(lock);
                         size[DLM_REPLY_REC_OFF] = lock->l_resource->lr_lvb_len;