From 973a355a79a84c1aa9e571e56b58f549ff914604 Mon Sep 17 00:00:00 2001 From: phil Date: Mon, 8 Sep 2003 23:02:24 +0000 Subject: [PATCH] - If the first user command isn't ENQUEUE, postsetup would be run too late, which causes the 'sanity' 1a hang that coop sees. Fixed by running postsetup if any of the non-setup RPCs arrives. - Remove overwriting of lgh_last_idx in llog_init_handle - init the handle from the test code (not quite right yet) - #if 0 out the filter catalog functions until they build --- lustre/obdclass/llog.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lustre/obdclass/llog.c b/lustre/obdclass/llog.c index 803e09a..73cbb6b 100644 --- a/lustre/obdclass/llog.c +++ b/lustre/obdclass/llog.c @@ -108,7 +108,7 @@ EXPORT_SYMBOL(llog_cancel_rec); int llog_init_handle(struct llog_handle *handle, int flags, struct obd_uuid *uuid) { - int rc; + int rc; struct llog_log_hdr *llh; ENTRY; LASSERT(handle->lgh_hdr == NULL); @@ -123,10 +123,10 @@ int llog_init_handle(struct llog_handle *handle, int flags, LASSERT(llh->llh_flags == flags); LASSERT(obd_uuid_equals(uuid, &llh->llh_tgtuuid)); RETURN(0); - } else if (rc != LLOG_EEMPTY) { + } else if (rc != LLOG_EEMPTY) { GOTO(out, rc); } - + llh->llh_hdr.lrh_type = LLOG_HDR_MAGIC; llh->llh_hdr.lrh_len = llh->llh_tail.lrt_len = LLOG_CHUNK_SIZE; llh->llh_hdr.lrh_index = llh->llh_tail.lrt_index = 0; @@ -135,12 +135,12 @@ int llog_init_handle(struct llog_handle *handle, int flags, memcpy(&llh->llh_tgtuuid, uuid, sizeof(llh->llh_tgtuuid)); llh->llh_bitmap_offset = offsetof(typeof(*llh), llh_bitmap); - if (llh->llh_flags & LLOG_F_IS_CAT) + if (flags & LLOG_F_IS_CAT) INIT_LIST_HEAD(&handle->u.chd.chd_head); - if (llh->llh_flags & LLOG_F_IS_PLAIN) { + else if (llh->llh_flags & LLOG_F_IS_PLAIN) INIT_LIST_HEAD(&handle->u.phd.phd_entry); - handle->lgh_last_idx = 1; - } + else + LBUG(); out: if (rc) OBD_FREE(llh, sizeof(*llh)); -- 1.8.3.1