X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fobdclass%2Fllog_cat.c;h=54e911f17293f65d71559e75882ee36d741c78bd;hp=9ba6eb2cc6116241dc813e18fa69556bbd93457e;hb=6fb209991e80cf71d97ad566d1a757e4a31466e0;hpb=e2af7fb3c91dfb13d34d8e1b2f2df8c09621f768 diff --git a/lustre/obdclass/llog_cat.c b/lustre/obdclass/llog_cat.c index 9ba6eb2..54e911f 100644 --- a/lustre/obdclass/llog_cat.c +++ b/lustre/obdclass/llog_cat.c @@ -91,13 +91,18 @@ static struct llog_handle *llog_cat_new_log(struct llog_handle *cathandle) if (index == 0) index = 1; + + cfs_spin_lock(&loghandle->lgh_hdr_lock); + llh->llh_count++; if (ext2_set_bit(index, llh->llh_bitmap)) { CERROR("argh, index %u already set in log bitmap?\n", index); + cfs_spin_unlock(&loghandle->lgh_hdr_lock); LBUG(); /* should never happen */ } + cfs_spin_unlock(&loghandle->lgh_hdr_lock); + cathandle->lgh_last_idx = index; - llh->llh_count++; llh->llh_tail.lrt_index = index; CDEBUG(D_RPCTRACE,"new recovery log "LPX64":%x for index %u of catalog " @@ -485,7 +490,7 @@ int llog_cat_process_thread(void *data) /* * Make sure that all cached data is sent. */ - llog_sync(ctxt, NULL); + llog_sync(ctxt, NULL, 0); GOTO(release_llh, rc); release_llh: rc = llog_cat_put(llh);