From af1503f4a3fc3f1f3e593a692e7dcfdd0a733272 Mon Sep 17 00:00:00 2001 From: zhanghc Date: Wed, 13 May 2009 08:02:07 +0000 Subject: [PATCH] b=18800 revert a just landed patch for bug18800, currently, this patch will be only landed on b_release_1_8_1 --- lustre/include/lustre_log.h | 2 -- lustre/lov/lov_log.c | 14 +++----------- lustre/mds/mds_log.c | 5 ----- lustre/obdclass/llog_obd.c | 5 ----- 4 files changed, 3 insertions(+), 23 deletions(-) diff --git a/lustre/include/lustre_log.h b/lustre/include/lustre_log.h index 1b1333a..ad872a5 100644 --- a/lustre/include/lustre_log.h +++ b/lustre/include/lustre_log.h @@ -251,7 +251,6 @@ int llog_get_cat_list(struct obd_device *obd, struct obd_device *disk_obd, int llog_put_cat_list(struct obd_device *obd, struct obd_device *disk_obd, char *name, int idx, int count, struct llog_catid *idarray); -#define LLOG_CTXT_FLAG_UNINITIALIZED 0x00000001 struct llog_ctxt { int loc_idx; /* my index the obd array of ctxt's */ struct llog_gen loc_gen; @@ -266,7 +265,6 @@ struct llog_ctxt { atomic_t loc_refcount; struct llog_commit_master *loc_lcm; void *llog_proc_cb; - long loc_flags; /* flags, see above defines */ }; #define LCM_NAME_SIZE 64 diff --git a/lustre/lov/lov_log.c b/lustre/lov/lov_log.c index 57f5ce7..44c881e 100644 --- a/lustre/lov/lov_log.c +++ b/lustre/lov/lov_log.c @@ -116,17 +116,9 @@ static int lov_llog_origin_add(struct llog_ctxt *ctxt, struct llog_rec_hdr *rec, llog_ctxt_put(cctxt); cctxt = NULL; } - - if (cctxt && cctxt->loc_flags & LLOG_CTXT_FLAG_UNINITIALIZED) { - llog_ctxt_put(cctxt); - rc = -EAGAIN; - } else { - /* "cctxt == NULL" will be checked in llog_add */ - rc = llog_add(cctxt, rec, NULL, logcookies + cookies, - numcookies - cookies); - llog_ctxt_put(cctxt); - } - + rc = llog_add(cctxt, rec, NULL, logcookies + cookies, + numcookies - cookies); + llog_ctxt_put(cctxt); if (rc < 0) { CERROR("Can't add llog (rc = %d) for stripe %i\n", rc, cookies); diff --git a/lustre/mds/mds_log.c b/lustre/mds/mds_log.c index ae85df1..ca76e09 100644 --- a/lustre/mds/mds_log.c +++ b/lustre/mds/mds_log.c @@ -66,11 +66,6 @@ static int mds_llog_origin_add(struct llog_ctxt *ctxt, struct llog_rec_hdr *rec, ENTRY; lctxt = llog_get_context(lov_obd, ctxt->loc_idx); - if (lctxt && lctxt->loc_flags & LLOG_CTXT_FLAG_UNINITIALIZED) { - llog_ctxt_put(lctxt); - RETURN(-EAGAIN); - } - /* "lctxt == NULL" will be checked in llog_add */ rc = llog_add(lctxt, rec, lsm, logcookies, numcookies); llog_ctxt_put(lctxt); diff --git a/lustre/obdclass/llog_obd.c b/lustre/obdclass/llog_obd.c index 469fd15..e2be6c8 100644 --- a/lustre/obdclass/llog_obd.c +++ b/lustre/obdclass/llog_obd.c @@ -60,7 +60,6 @@ static struct llog_ctxt* llog_new_ctxt(struct obd_device *obd) ctxt->loc_obd = obd; atomic_set(&ctxt->loc_refcount, 1); - ctxt->loc_flags = LLOG_CTXT_FLAG_UNINITIALIZED; return ctxt; } @@ -195,10 +194,6 @@ int llog_setup(struct obd_device *obd, int index, struct obd_device *disk_obd, CERROR("obd %s ctxt %d lop_setup=%p failed %d\n", obd->obd_name, index, op->lop_setup, rc); llog_ctxt_put(ctxt); - } else { - CDEBUG(D_CONFIG, "obd %s ctxt %d is initialized\n", - obd->obd_name, index); - ctxt->loc_flags &= ~LLOG_CTXT_FLAG_UNINITIALIZED; } out: mutex_up(&obd->obd_llog_alloc); -- 1.8.3.1