Whamcloud - gitweb
- lov_add_obd() should pass OBD_NOTIGY_ACTIVE instead of 1 as 1 means OBD_NOTIGY_INAC...
authoryury <yury>
Sat, 17 Dec 2005 17:06:57 +0000 (17:06 +0000)
committeryury <yury>
Sat, 17 Dec 2005 17:06:57 +0000 (17:06 +0000)
This seems result of wrong backport from HEAD, as in HEAD obd_notify() has boolean flag (active/inactive) instead of event type.
This bug caused mds_notify() did nothing in the case of addind one more OST.
- fixed ENTRY/RETURN in lov_notify()

lustre/lov/lov_obd.c

index 2e294eb..b55fe26 100644 (file)
@@ -390,14 +390,15 @@ static int lov_set_osc_active(struct lov_obd *lov, struct obd_uuid *uuid,
 static int lov_notify(struct obd_device *obd, struct obd_device *watched,
                       enum obd_notify_event ev)
 {
-        int rc;
         struct obd_uuid *uuid;
+        int rc;
+        ENTRY;
 
         if (strcmp(watched->obd_type->typ_name, LUSTRE_OSC_NAME)) {
                 CERROR("unexpected notification of %s %s!\n",
                        watched->obd_type->typ_name,
                        watched->obd_name);
-                return -EINVAL;
+                RETURN(-EINVAL);
         }
         uuid = &watched->u.cli.cl_import->imp_target_uuid;
 
@@ -520,7 +521,7 @@ lov_add_obd(struct obd_device *obd, struct obd_uuid *uuidp, int index, int gen)
         if (rc)
                 GOTO(out, rc);
 
-        rc = lov_notify(obd, tgt->ltd_exp->exp_obd, 1);
+        rc = lov_notify(obd, tgt->ltd_exp->exp_obd, OBD_NOTIFY_ACTIVE);
         GOTO(out, rc);
  out:
         if (rc && tgt->ltd_exp != NULL)