Whamcloud - gitweb
Branch b1_8_gate
authorjohann <johann>
Fri, 18 Jul 2008 10:25:18 +0000 (10:25 +0000)
committerjohann <johann>
Fri, 18 Jul 2008 10:25:18 +0000 (10:25 +0000)
b=16002
i=wangdi

Add regression test for bug 13913.

lustre/obdclass/llog_obd.c

index a49c621..599e6fc 100644 (file)
@@ -151,8 +151,12 @@ int llog_setup(struct obd_device *obd, int index, struct obd_device *disk_obd,
         ctxt->loc_logops = op;
         sema_init(&ctxt->loc_sem, 1);
 
-        if (op->lop_setup)
-                rc = op->lop_setup(obd, index, disk_obd, count, logid);
+        if (op->lop_setup) {
+                if (OBD_FAIL_CHECK(OBD_FAIL_OBD_LLOG_SETUP))
+                        rc = -EOPNOTSUPP;
+                else
+                        rc = op->lop_setup(obd, index, disk_obd, count, logid);
+        }
 
         if (rc) {
                 llog_ctxt_destroy(ctxt);