From 64c457d87084f5cb9ed95468449167b847af407e Mon Sep 17 00:00:00 2001 From: yury Date: Sat, 17 Dec 2005 17:06:57 +0000 Subject: [PATCH] - lov_add_obd() should pass OBD_NOTIGY_ACTIVE instead of 1 as 1 means OBD_NOTIGY_INACTIVE, also not good to use magical digits. 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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 2e294eb..b55fe26 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -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) -- 1.8.3.1