From b4802f41d8e4bd6ffa666fd691dc340b1302bcca Mon Sep 17 00:00:00 2001 From: brian Date: Thu, 22 Dec 2005 19:30:46 +0000 Subject: [PATCH] Revert this commit. The obdfilter module produces the following error on load: /lib/modules/2.4.21-37.EL_lustre-b_release_1_4_6.200512222341smp/kernel/fs/lustre/obdfilter.o: unresolved symbol IS_KEY --- lustre/ldlm/ldlm_lock.c | 2 +- lustre/lov/lov_obd.c | 2 +- lustre/mds/mds_lov.c | 14 ++++++++------ lustre/obdfilter/filter.c | 3 ++- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lustre/ldlm/ldlm_lock.c b/lustre/ldlm/ldlm_lock.c index b1c9173..16ea94e 100644 --- a/lustre/ldlm/ldlm_lock.c +++ b/lustre/ldlm/ldlm_lock.c @@ -131,7 +131,7 @@ void ldlm_lock_put(struct ldlm_lock *lock) struct obd_export *export = NULL; l_lock(&ns->ns_lock); - LDLM_DEBUG(lock, "final lock_put on destroyed lock, freeing it."); + LDLM_DEBUG(lock, "final lock_put on destroyed lock, freeing"); LASSERT(lock->l_destroyed); LASSERT(list_empty(&lock->l_res_link)); diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 9aecee04..b55fe26 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -2202,7 +2202,7 @@ static int lov_set_info(struct obd_export *exp, obd_count keylen, continue; err = obd_set_info(lov->tgts[i].ltd_exp, - keylen, key, vallen, val); + keylen, key, vallen, val); if (!rc) rc = err; } diff --git a/lustre/mds/mds_lov.c b/lustre/mds/mds_lov.c index 79b1990..6c78bdf 100644 --- a/lustre/mds/mds_lov.c +++ b/lustre/mds/mds_lov.c @@ -151,16 +151,13 @@ int mds_init_lov_desc(struct obd_device *obd, struct obd_export *osc_exp) int valsize, rc; ENTRY; - mds->mds_has_lov_desc = 0; valsize = sizeof(mds->mds_lov_desc); rc = obd_get_info(mds->mds_osc_exp, strlen("lovdesc") + 1, "lovdesc", &valsize, &mds->mds_lov_desc); - if (rc) { + if (rc) CERROR("can't get lov_desc, rc %d\n", rc); - RETURN(rc); - } - mds->mds_has_lov_desc = 1; + mds->mds_has_lov_desc = rc ? 0 : 1; if (mds->mds_has_lov_desc) { CDEBUG(D_HA, "updating lov_desc, tgt_count: %d\n", @@ -173,7 +170,7 @@ int mds_init_lov_desc(struct obd_device *obd, struct obd_export *osc_exp) CDEBUG(D_HA, "updating max_mdsize/max_cookiesize: %d/%d\n", mds->mds_max_mdsize, mds->mds_max_cookiesize); } - RETURN(0); + RETURN(rc); } /* update the LOV-OSC knowledge of the last used object id's */ @@ -629,6 +626,11 @@ int mds_notify(struct obd_device *obd, struct obd_device *watched, if (rc) RETURN(rc); + rc = obd_set_info(mds->mds_osc_exp, strlen("mds_conn"), + "mds_conn", 0, uuid); + if (rc != 0) + RETURN(rc); + rc = mds_lov_start_synchronize(obd, uuid, 1); lquota_recovery(quota_interface, obd); } diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index bc6973b..4c8ac2d 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -2820,7 +2820,8 @@ static int filter_set_info(struct obd_export *exp, __u32 keylen, RETURN(-EINVAL); } - if (!IS_KEY("mds_conn")) + if (keylen < strlen("mds_conn") || + memcmp(key, "mds_conn", keylen) != 0) RETURN(-EINVAL); CWARN("%s: received MDS connection from %s\n", obd->obd_name, -- 1.8.3.1