From 5a8e47d0a1a7548a7f6bbf977a4fdb3935adaed6 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Sun, 26 Feb 2017 17:32:40 -0700 Subject: [PATCH] LU-9153 llog: update llog print format to use FIDs Print llog identifiers using FIDs instead of OSTID format, which has been deprecated since 2.3. Signed-off-by: Andreas Dilger Change-Id: Id012c059e8151e2a78086579150f04b1b05cab07 Reviewed-on: https://review.whamcloud.com/25640 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Henri Doreau Reviewed-by: Faccini Bruno Reviewed-by: Oleg Drokin --- lustre/lod/lod_dev.c | 8 +-- lustre/lod/lod_sub_object.c | 4 +- lustre/mdd/mdd_device.c | 22 ++++----- lustre/obdclass/llog.c | 18 +++---- lustre/obdclass/llog_cat.c | 115 ++++++++++++++++++++++--------------------- lustre/obdclass/llog_osd.c | 33 ++++++------- lustre/obdclass/llog_swab.c | 18 +++---- lustre/osp/osp_sync.c | 12 ++--- lustre/target/update_trans.c | 16 +++--- 9 files changed, 122 insertions(+), 124 deletions(-) diff --git a/lustre/lod/lod_dev.c b/lustre/lod/lod_dev.c index b75038c..7c4078e 100644 --- a/lustre/lod/lod_dev.c +++ b/lustre/lod/lod_dev.c @@ -316,9 +316,9 @@ static int lod_process_recovery_updates(const struct lu_env *env, if (rec->lrh_len != llog_update_record_size((struct llog_update_record *)rec)) { - CERROR("%s broken update record! index %u "DOSTID":%u :" + CERROR("%s broken update record! index %u "DFID".%u :" " rc = %d\n", lod2obd(lrd->lrd_lod)->obd_name, index, - POSTID(&llh->lgh_id.lgl_oi), rec->lrh_index, -EIO); + PFID(&llh->lgh_id.lgl_oi.oi_fid), rec->lrh_index, -EIO); return -EINVAL; } @@ -326,9 +326,9 @@ static int lod_process_recovery_updates(const struct lu_env *env, cookie->lgc_index = rec->lrh_index; cookie->lgc_subsys = LLOG_UPDATELOG_ORIG_CTXT; - CDEBUG(D_HA, "%s: process recovery updates "DOSTID":%u\n", + CDEBUG(D_HA, "%s: process recovery updates "DFID".%u\n", lod2obd(lrd->lrd_lod)->obd_name, - POSTID(&llh->lgh_id.lgl_oi), rec->lrh_index); + PFID(&llh->lgh_id.lgl_oi.oi_fid), rec->lrh_index); lut = lod2lu_dev(lrd->lrd_lod)->ld_site->ls_tgt; if (lut->lut_obd->obd_stopping || diff --git a/lustre/lod/lod_sub_object.c b/lustre/lod/lod_sub_object.c index a13bf99..b2e89c8 100644 --- a/lustre/lod/lod_sub_object.c +++ b/lustre/lod/lod_sub_object.c @@ -998,8 +998,8 @@ int lod_sub_prep_llog(const struct lu_env *env, struct lod_device *lod, ctxt->loc_handle = lgh; - CDEBUG(D_INFO, "%s: Init llog for %d - catid "DOSTID":%x\n", - obd->obd_name, index, POSTID(&cid->lci_logid.lgl_oi), + CDEBUG(D_INFO, "%s: init llog for index %d - catid "DFID":%x\n", + obd->obd_name, index, PFID(&cid->lci_logid.lgl_oi.oi_fid), cid->lci_logid.lgl_ogen); out_close: if (rc != 0) diff --git a/lustre/mdd/mdd_device.c b/lustre/mdd/mdd_device.c index 620615b..45141822 100644 --- a/lustre/mdd/mdd_device.c +++ b/lustre/mdd/mdd_device.c @@ -179,9 +179,9 @@ static int changelog_init_cb(const struct lu_env *env, struct llog_handle *llh, CDEBUG(D_INFO, "seeing record at index %d/%d/%llu t=%x %.*s in log" - DOSTID"\n", hdr->lrh_index, rec->cr_hdr.lrh_index, + DFID"\n", hdr->lrh_index, rec->cr_hdr.lrh_index, rec->cr.cr_index, rec->cr.cr_type, rec->cr.cr_namelen, - changelog_rec_name(&rec->cr), POSTID(&llh->lgh_id.lgl_oi)); + changelog_rec_name(&rec->cr), PFID(&llh->lgh_id.lgl_oi.oi_fid)); mdd->mdd_cl.mc_index = rec->cr.cr_index; return LLOG_PROC_BREAK; @@ -191,16 +191,16 @@ static int changelog_user_init_cb(const struct lu_env *env, struct llog_handle *llh, struct llog_rec_hdr *hdr, void *data) { - struct mdd_device *mdd = (struct mdd_device *)data; - struct llog_changelog_user_rec *rec = - (struct llog_changelog_user_rec *)hdr; + struct mdd_device *mdd = (struct mdd_device *)data; + struct llog_changelog_user_rec *rec = + (struct llog_changelog_user_rec *)hdr; - LASSERT(llh->lgh_hdr->llh_flags & LLOG_F_IS_PLAIN); - LASSERT(rec->cur_hdr.lrh_type == CHANGELOG_USER_REC); + LASSERT(llh->lgh_hdr->llh_flags & LLOG_F_IS_PLAIN); + LASSERT(rec->cur_hdr.lrh_type == CHANGELOG_USER_REC); CDEBUG(D_INFO, "seeing user at index %d/%d id=%d endrec=%llu" - " in log "DOSTID"\n", hdr->lrh_index, rec->cur_hdr.lrh_index, - rec->cur_id, rec->cur_endrec, POSTID(&llh->lgh_id.lgl_oi)); + " in log "DFID"\n", hdr->lrh_index, rec->cur_hdr.lrh_index, + rec->cur_id, rec->cur_endrec, PFID(&llh->lgh_id.lgl_oi.oi_fid)); spin_lock(&mdd->mdd_cl.mc_user_lock); mdd->mdd_cl.mc_lastuser = rec->cur_id; @@ -258,9 +258,9 @@ static int llog_changelog_cancel(const struct lu_env *env, /* 0 or 1 means we're done */ rc = 0; else - CERROR("%s: cancel idx %u of catalog "DOSTID" rc=%d\n", + CERROR("%s: cancel idx %u of catalog "DFID": rc = %d\n", ctxt->loc_obd->obd_name, cathandle->lgh_last_idx, - POSTID(&cathandle->lgh_id.lgl_oi), rc); + PFID(&cathandle->lgh_id.lgl_oi.oi_fid), rc); RETURN(rc); } diff --git a/lustre/obdclass/llog.c b/lustre/obdclass/llog.c index 8a589aa..b9fee59c 100644 --- a/lustre/obdclass/llog.c +++ b/lustre/obdclass/llog.c @@ -204,8 +204,8 @@ int llog_cancel_rec(const struct lu_env *env, struct llog_handle *loghandle, ENTRY; - CDEBUG(D_RPCTRACE, "Canceling %d in log "DOSTID"\n", index, - POSTID(&loghandle->lgh_id.lgl_oi)); + CDEBUG(D_RPCTRACE, "Canceling %d in log "DFID"\n", index, + PFID(&loghandle->lgh_id.lgl_oi.oi_fid)); if (index == 0) { CERROR("Can't cancel index 0 which is header\n"); @@ -270,11 +270,9 @@ int llog_cancel_rec(const struct lu_env *env, struct llog_handle *loghandle, * the bitmap has been clearly, so the record can not * be accessed anymore, let's return 0 for now, and * the orphan will be handled by LFSCK. */ - CERROR("%s: can't destroy empty llog #"DOSTID - "#%08x: rc = %d\n", + CERROR("%s: can't destroy empty llog "DFID": rc = %d\n", loghandle->lgh_ctxt->loc_obd->obd_name, - POSTID(&loghandle->lgh_id.lgl_oi), - loghandle->lgh_id.lgl_ogen, rc); + PFID(&loghandle->lgh_id.lgl_oi.oi_fid), rc); GOTO(out_unlock, rc = 0); } rc = LLOG_DEL_PLAIN; @@ -538,11 +536,11 @@ repeat: } if (rec->lrh_len == 0 || rec->lrh_len > chunk_size) { - CWARN("%s: invalid length %d in llog "DOSTID + CWARN("%s: invalid length %d in llog "DFID "record for index %d/%d\n", loghandle->lgh_ctxt->loc_obd->obd_name, rec->lrh_len, - POSTID(&loghandle->lgh_id.lgl_oi), + PFID(&loghandle->lgh_id.lgl_oi.oi_fid), rec->lrh_index, index); GOTO(out, rc = -EINVAL); @@ -555,10 +553,10 @@ repeat: } if (rec->lrh_index != index) { - CERROR("%s: "DOSTID" Invalid record: index %u" + CERROR("%s: "DFID" Invalid record: index %u" " but expected %u\n", loghandle->lgh_ctxt->loc_obd->obd_name, - POSTID(&loghandle->lgh_id.lgl_oi), + PFID(&loghandle->lgh_id.lgl_oi.oi_fid), rec->lrh_index, index); GOTO(out, rc = -ERANGE); } diff --git a/lustre/obdclass/llog_cat.c b/lustre/obdclass/llog_cat.c index 82c8ce9..b6b29eb 100644 --- a/lustre/obdclass/llog_cat.c +++ b/lustre/obdclass/llog_cat.c @@ -165,10 +165,9 @@ static int llog_cat_new_log(const struct lu_env *env, if (rc < 0) GOTO(out_destroy, rc); - CDEBUG(D_OTHER, "new plain log "DOSTID":%x for index %u of catalog" - DOSTID"\n", POSTID(&loghandle->lgh_id.lgl_oi), - loghandle->lgh_id.lgl_ogen, rec->lid_hdr.lrh_index, - POSTID(&cathandle->lgh_id.lgl_oi)); + CDEBUG(D_OTHER, "new plain log "DFID".%u of catalog "DFID"\n", + PFID(&loghandle->lgh_id.lgl_oi.oi_fid), rec->lid_hdr.lrh_index, + PFID(&cathandle->lgh_id.lgl_oi.oi_fid)); loghandle->lgh_hdr->llh_cat_idx = rec->lid_hdr.lrh_index; @@ -239,10 +238,10 @@ int llog_cat_id2handle(const struct lu_env *env, struct llog_handle *cathandle, if (ostid_id(&cgl->lgl_oi) == ostid_id(&logid->lgl_oi) && ostid_seq(&cgl->lgl_oi) == ostid_seq(&logid->lgl_oi)) { if (cgl->lgl_ogen != logid->lgl_ogen) { - CERROR("%s: log "DOSTID" generation %x != %x\n", - loghandle->lgh_ctxt->loc_obd->obd_name, - POSTID(&logid->lgl_oi), cgl->lgl_ogen, - logid->lgl_ogen); + CWARN("%s: log "DFID" generation %x != %x\n", + loghandle->lgh_ctxt->loc_obd->obd_name, + PFID(&logid->lgl_oi.oi_fid), + cgl->lgl_ogen, logid->lgl_ogen); continue; } loghandle->u.phd.phd_cat_handle = cathandle; @@ -255,9 +254,9 @@ int llog_cat_id2handle(const struct lu_env *env, struct llog_handle *cathandle, rc = llog_open(env, cathandle->lgh_ctxt, &loghandle, logid, NULL, LLOG_OPEN_EXISTS); if (rc < 0) { - CERROR("%s: error opening log id "DOSTID":%x: rc = %d\n", + CERROR("%s: error opening log id "DFID":%x: rc = %d\n", cathandle->lgh_ctxt->loc_obd->obd_name, - POSTID(&logid->lgl_oi), logid->lgl_ogen, rc); + PFID(&logid->lgl_oi.oi_fid), logid->lgl_ogen, rc); RETURN(rc); } @@ -731,15 +730,16 @@ int llog_cat_cancel_records(const struct lu_env *env, ENTRY; for (i = 0; i < count; i++, cookies++) { - struct llog_handle *loghandle; - struct llog_logid *lgl = &cookies->lgc_lgl; - int lrc; + struct llog_handle *loghandle; + struct llog_logid *lgl = &cookies->lgc_lgl; + int lrc; rc = llog_cat_id2handle(env, cathandle, &loghandle, lgl); if (rc) { - CERROR("%s: cannot find handle for llog "DOSTID": %d\n", + CDEBUG(D_HA, "%s: cannot find llog for handle "DFID":%x" + ": rc = %d\n", cathandle->lgh_ctxt->loc_obd->obd_name, - POSTID(&lgl->lgl_oi), rc); + PFID(&lgl->lgl_oi.oi_fid), lgl->lgl_ogen, rc); failed++; continue; } @@ -747,8 +747,7 @@ int llog_cat_cancel_records(const struct lu_env *env, lrc = llog_cancel_rec(env, loghandle, cookies->lgc_index); if (lrc == LLOG_DEL_PLAIN) { /* log has been destroyed */ index = loghandle->u.phd.phd_cookie.lgc_index; - rc = llog_cat_cleanup(env, cathandle, loghandle, - index); + rc = llog_cat_cleanup(env, cathandle, loghandle, index); } else if (lrc == -ENOENT) { if (rc == 0) /* ENOENT shouldn't rewrite any error */ rc = lrc; @@ -771,26 +770,26 @@ static int llog_cat_process_cb(const struct lu_env *env, struct llog_handle *cat_llh, struct llog_rec_hdr *rec, void *data) { - struct llog_process_data *d = data; - struct llog_logid_rec *lir = (struct llog_logid_rec *)rec; - struct llog_handle *llh; + struct llog_process_data *d = data; + struct llog_logid_rec *lir = (struct llog_logid_rec *)rec; + struct llog_handle *llh; struct llog_log_hdr *hdr; - int rc; + int rc; - ENTRY; - if (rec->lrh_type != LLOG_LOGID_MAGIC) { - CERROR("invalid record in catalog\n"); - RETURN(-EINVAL); - } - CDEBUG(D_HA, "processing log "DOSTID":%x at index %u of catalog " - DOSTID"\n", POSTID(&lir->lid_id.lgl_oi), lir->lid_id.lgl_ogen, - rec->lrh_index, POSTID(&cat_llh->lgh_id.lgl_oi)); + ENTRY; + if (rec->lrh_type != LLOG_LOGID_MAGIC) { + CERROR("invalid record in catalog\n"); + RETURN(-EINVAL); + } + CDEBUG(D_HA, "processing log "DFID":%x at index %u of catalog " + DFID"\n", PFID(&lir->lid_id.lgl_oi.oi_fid), lir->lid_id.lgl_ogen, + rec->lrh_index, PFID(&cat_llh->lgh_id.lgl_oi.oi_fid)); rc = llog_cat_id2handle(env, cat_llh, &llh, &lir->lid_id); if (rc) { - CERROR("%s: cannot find handle for llog "DOSTID": %d\n", + CERROR("%s: cannot find handle for llog "DFID": rc = %d\n", cat_llh->lgh_ctxt->loc_obd->obd_name, - POSTID(&lir->lid_id.lgl_oi), rc); + PFID(&lir->lid_id.lgl_oi.oi_fid), rc); if (rc == -ENOENT || rc == -ESTALE) { /* After a server crash, a stub of index * record in catlog could be kept, because @@ -863,13 +862,14 @@ int llog_cat_process_or_fork(const struct lu_env *env, if (llh->llh_cat_idx >= cat_llh->lgh_last_idx && llh->llh_count > 1) { - struct llog_process_cat_data cd; + struct llog_process_cat_data cd; - CWARN("catlog "DOSTID" crosses index zero\n", - POSTID(&cat_llh->lgh_id.lgl_oi)); + CWARN("%s: catlog "DFID" crosses index zero\n", + cat_llh->lgh_ctxt->loc_obd->obd_name, + PFID(&cat_llh->lgh_id.lgl_oi.oi_fid)); - cd.lpcd_first_idx = llh->llh_cat_idx; - cd.lpcd_last_idx = 0; + cd.lpcd_first_idx = llh->llh_cat_idx; + cd.lpcd_last_idx = 0; rc = llog_process_or_fork(env, cat_llh, cat_cb, &d, &cd, fork); if (rc != 0) @@ -912,22 +912,22 @@ static int llog_cat_size_cb(const struct lu_env *env, cat_llh->lgh_ctxt->loc_obd->obd_name, -EINVAL); RETURN(-EINVAL); } - CDEBUG(D_HA, "processing log "DOSTID":%x at index %u of catalog " - DOSTID"\n", POSTID(&lir->lid_id.lgl_oi), lir->lid_id.lgl_ogen, - rec->lrh_index, POSTID(&cat_llh->lgh_id.lgl_oi)); + CDEBUG(D_HA, "processing log "DFID":%x at index %u of catalog " + DFID"\n", PFID(&lir->lid_id.lgl_oi.oi_fid), lir->lid_id.lgl_ogen, + rec->lrh_index, PFID(&cat_llh->lgh_id.lgl_oi.oi_fid)); rc = llog_cat_id2handle(env, cat_llh, &llh, &lir->lid_id); if (rc) { - CWARN("%s: cannot find handle for llog "DOSTID": rc = %d\n", + CWARN("%s: cannot find handle for llog "DFID": rc = %d\n", cat_llh->lgh_ctxt->loc_obd->obd_name, - POSTID(&lir->lid_id.lgl_oi), rc); + PFID(&lir->lid_id.lgl_oi.oi_fid), rc); RETURN(0); } size = llog_size(env, llh); *cum_size += size; - CDEBUG(D_INFO, "Add llog entry "DOSTID" size %llu\n", - POSTID(&llh->lgh_id.lgl_oi), size); + CDEBUG(D_INFO, "Add llog entry "DFID" size %llu\n", + PFID(&llh->lgh_id.lgl_oi.oi_fid), size); llog_handle_put(llh); @@ -960,15 +960,16 @@ static int llog_cat_reverse_process_cb(const struct lu_env *env, CERROR("invalid record in catalog\n"); RETURN(-EINVAL); } - CDEBUG(D_HA, "processing log "DOSTID":%x at index %u of catalog " - DOSTID"\n", POSTID(&lir->lid_id.lgl_oi), lir->lid_id.lgl_ogen, - le32_to_cpu(rec->lrh_index), POSTID(&cat_llh->lgh_id.lgl_oi)); + CDEBUG(D_HA, "processing log "DFID":%x at index %u of catalog " + DFID"\n", PFID(&lir->lid_id.lgl_oi.oi_fid), lir->lid_id.lgl_ogen, + le32_to_cpu(rec->lrh_index), + PFID(&cat_llh->lgh_id.lgl_oi.oi_fid)); rc = llog_cat_id2handle(env, cat_llh, &llh, &lir->lid_id); if (rc) { - CERROR("%s: cannot find handle for llog "DOSTID": %d\n", + CERROR("%s: cannot find handle for llog "DFID": rc = %d\n", cat_llh->lgh_ctxt->loc_obd->obd_name, - POSTID(&lir->lid_id.lgl_oi), rc); + PFID(&lir->lid_id.lgl_oi.oi_fid), rc); if (rc == -ENOENT || rc == -ESTALE) { /* After a server crash, a stub of index * record in catlog could be kept, because @@ -1023,11 +1024,12 @@ int llog_cat_reverse_process(const struct lu_env *env, if (llh->llh_cat_idx >= cat_llh->lgh_last_idx && llh->llh_count > 1) { - CWARN("catalog "DOSTID" crosses index zero\n", - POSTID(&cat_llh->lgh_id.lgl_oi)); + CWARN("%s: catalog "DFID" crosses index zero\n", + cat_llh->lgh_ctxt->loc_obd->obd_name, + PFID(&cat_llh->lgh_id.lgl_oi.oi_fid)); - cd.lpcd_first_idx = 0; - cd.lpcd_last_idx = cat_llh->lgh_last_idx; + cd.lpcd_first_idx = 0; + cd.lpcd_last_idx = cat_llh->lgh_last_idx; rc = llog_reverse_process(env, cat_llh, llog_cat_reverse_process_cb, &d, &cd); @@ -1081,8 +1083,8 @@ static int llog_cat_set_first_idx(struct llog_handle *cathandle, int idx) } } - CDEBUG(D_RPCTRACE, "Set catlog "DOSTID" first idx %u," - " (last_idx %u)\n", POSTID(&cathandle->lgh_id.lgl_oi), + CDEBUG(D_RPCTRACE, "catlog "DFID" first idx %u, last_idx %u\n", + PFID(&cathandle->lgh_id.lgl_oi.oi_fid), llh->llh_cat_idx, cathandle->lgh_last_idx); } @@ -1117,8 +1119,7 @@ int llog_cat_cleanup(const struct lu_env *env, struct llog_handle *cathandle, llog_cat_set_first_idx(cathandle, index); rc = llog_cancel_rec(env, cathandle, index); if (rc == 0) - CDEBUG(D_HA, "cancel plain log at index" - " %u of catalog "DOSTID"\n", - index, POSTID(&cathandle->lgh_id.lgl_oi)); + CDEBUG(D_HA, "cancel plain log at index %u of catalog "DFID"\n", + index, PFID(&cathandle->lgh_id.lgl_oi.oi_fid)); return rc; } diff --git a/lustre/obdclass/llog_osd.c b/lustre/obdclass/llog_osd.c index 2f976e9..9d458f4 100644 --- a/lustre/obdclass/llog_osd.c +++ b/lustre/obdclass/llog_osd.c @@ -503,9 +503,9 @@ static int llog_osd_write_rec(const struct lu_env *env, } lgi->lgi_off = loghandle->lgh_cur_offset; - CDEBUG(D_OTHER, "modify record "DOSTID": idx:%d, " + CDEBUG(D_OTHER, "modify record "DFID": idx:%u, " "len:%u offset %llu\n", - POSTID(&loghandle->lgh_id.lgl_oi), idx, + PFID(&loghandle->lgh_id.lgl_oi.oi_fid), idx, rec->lrh_len, (long long)lgi->lgi_off); } else if (llh->llh_flags & LLOG_F_IS_FIXSIZE) { lgi->lgi_off = llh->llh_hdr.lrh_len + @@ -559,10 +559,9 @@ static int llog_osd_write_rec(const struct lu_env *env, if (loghandle->lgh_max_size > 0 && lgi->lgi_off >= loghandle->lgh_max_size) { CDEBUG(D_OTHER, "llog is getting too large (%u > %u) at %u " - DOSTID"\n", (unsigned)lgi->lgi_off, - loghandle->lgh_max_size, - (int)loghandle->lgh_last_idx, - POSTID(&loghandle->lgh_id.lgl_oi)); + DFID"\n", (unsigned)lgi->lgi_off, + loghandle->lgh_max_size, (int)loghandle->lgh_last_idx, + PFID(&loghandle->lgh_id.lgl_oi.oi_fid)); /* this is to signal that this llog is full */ loghandle->lgh_last_idx = LLOG_HDR_BITMAP_SIZE(llh) - 1; RETURN(-ENOSPC); @@ -694,7 +693,7 @@ out_unlock: if (rc < 0) GOTO(out, rc); - CDEBUG(D_HA, "added record "DFID": idx: %u, %u off%llu\n", + CDEBUG(D_HA, "added record "DFID".%u, %u off%llu\n", PFID(lu_object_fid(&o->do_lu)), index, rec->lrh_len, lgi->lgi_off); if (reccookie != NULL) { @@ -900,10 +899,10 @@ static int llog_osd_next_block(const struct lu_env *env, if (!force_mini_rec) goto retry; - CERROR("%s: invalid llog block at log id "DOSTID"/%u " + CERROR("%s: invalid llog block at log id "DFID":%x " "offset %llu\n", o->do_lu.lo_dev->ld_obd->obd_name, - POSTID(&loghandle->lgh_id.lgl_oi), + PFID(&loghandle->lgh_id.lgl_oi.oi_fid), loghandle->lgh_id.lgl_ogen, *cur_offset); GOTO(out, rc = -EINVAL); } @@ -922,11 +921,11 @@ static int llog_osd_next_block(const struct lu_env *env, lustre_swab_llog_rec(last_rec); if (last_rec->lrh_index != tail->lrt_index) { - CERROR("%s: invalid llog tail at log id "DOSTID"/%u " + CERROR("%s: invalid llog tail at log id "DFID":%x " "offset %llu last_rec idx %u tail idx %u" "lrt len %u read_size %d\n", o->do_lu.lo_dev->ld_obd->obd_name, - POSTID(&loghandle->lgh_id.lgl_oi), + PFID(&loghandle->lgh_id.lgl_oi.oi_fid), loghandle->lgh_id.lgl_ogen, *cur_offset, last_rec->lrh_index, tail->lrt_index, tail->lrt_len, rc); @@ -937,10 +936,10 @@ static int llog_osd_next_block(const struct lu_env *env, /* this shouldn't happen */ if (tail->lrt_index == 0) { - CERROR("%s: invalid llog tail at log id "DOSTID"/%u " + CERROR("%s: invalid llog tail at log id "DFID":%x " "offset %llu bytes %d\n", o->do_lu.lo_dev->ld_obd->obd_name, - POSTID(&loghandle->lgh_id.lgl_oi), + PFID(&loghandle->lgh_id.lgl_oi.oi_fid), loghandle->lgh_id.lgl_ogen, *cur_offset, rc); GOTO(out, rc = -EINVAL); } @@ -1056,10 +1055,10 @@ static int llog_osd_prev_block(const struct lu_env *env, GOTO(out, rc); if (rc < sizeof(*tail)) { - CERROR("%s: invalid llog block at log id "DOSTID"/%u " + CERROR("%s: invalid llog block at log id "DFID":%x " "offset %llu\n", o->do_lu.lo_dev->ld_obd->obd_name, - POSTID(&loghandle->lgh_id.lgl_oi), + PFID(&loghandle->lgh_id.lgl_oi.oi_fid), loghandle->lgh_id.lgl_ogen, cur_offset); GOTO(out, rc = -EINVAL); } @@ -1080,10 +1079,10 @@ static int llog_osd_prev_block(const struct lu_env *env, /* this shouldn't happen */ if (tail->lrt_index == 0) { - CERROR("%s: invalid llog tail at log id "DOSTID"/%u " + CERROR("%s: invalid llog tail at log id "DFID":%x " "offset %llu\n", o->do_lu.lo_dev->ld_obd->obd_name, - POSTID(&loghandle->lgh_id.lgl_oi), + PFID(&loghandle->lgh_id.lgl_oi.oi_fid), loghandle->lgh_id.lgl_ogen, cur_offset); GOTO(out, rc = -EINVAL); } diff --git a/lustre/obdclass/llog_swab.c b/lustre/obdclass/llog_swab.c index 3e62c57..cd248cd 100644 --- a/lustre/obdclass/llog_swab.c +++ b/lustre/obdclass/llog_swab.c @@ -44,15 +44,15 @@ static void print_llogd_body(struct llogd_body *d) { - CDEBUG(D_OTHER, "llogd body: %p\n", d); - CDEBUG(D_OTHER, "\tlgd_logid.lgl_oi: "DOSTID"\n", - POSTID(&d->lgd_logid.lgl_oi)); - CDEBUG(D_OTHER, "\tlgd_logid.lgl_ogen: %#x\n", d->lgd_logid.lgl_ogen); - CDEBUG(D_OTHER, "\tlgd_ctxt_idx: %#x\n", d->lgd_ctxt_idx); - CDEBUG(D_OTHER, "\tlgd_llh_flags: %#x\n", d->lgd_llh_flags); - CDEBUG(D_OTHER, "\tlgd_index: %#x\n", d->lgd_index); - CDEBUG(D_OTHER, "\tlgd_saved_index: %#x\n", d->lgd_saved_index); - CDEBUG(D_OTHER, "\tlgd_len: %#x\n", d->lgd_len); + CDEBUG(D_OTHER, "llogd body: %p\n", d); + CDEBUG(D_OTHER, "\tlgd_logid.lgl_oi.oi_fid: "DFID"\n", + PFID(&d->lgd_logid.lgl_oi.oi_fid)); + CDEBUG(D_OTHER, "\tlgd_logid.lgl_ogen: %#x\n", d->lgd_logid.lgl_ogen); + CDEBUG(D_OTHER, "\tlgd_ctxt_idx: %#x\n", d->lgd_ctxt_idx); + CDEBUG(D_OTHER, "\tlgd_llh_flags: %#x\n", d->lgd_llh_flags); + CDEBUG(D_OTHER, "\tlgd_index: %#x\n", d->lgd_index); + CDEBUG(D_OTHER, "\tlgd_saved_index: %#x\n", d->lgd_saved_index); + CDEBUG(D_OTHER, "\tlgd_len: %#x\n", d->lgd_len); CDEBUG(D_OTHER, "\tlgd_cur_offset: %#llx\n", d->lgd_cur_offset); } diff --git a/lustre/osp/osp_sync.c b/lustre/osp/osp_sync.c index f54b7be..9887c30 100644 --- a/lustre/osp/osp_sync.c +++ b/lustre/osp/osp_sync.c @@ -433,11 +433,11 @@ static int osp_sync_add_rec(const struct lu_env *env, struct osp_device *d, llog_ctxt_put(ctxt); if (likely(rc >= 0)) { - CDEBUG(D_OTHER, "%s: new record "DOSTID":%lu/%lu: %d\n", + CDEBUG(D_OTHER, "%s: new record "DFID":%x.%u: rc = %d\n", d->opd_obd->obd_name, - POSTID(&osi->osi_cookie.lgc_lgl.lgl_oi), - (unsigned long)osi->osi_cookie.lgc_lgl.lgl_ogen, - (unsigned long)osi->osi_cookie.lgc_index, rc); + PFID(&osi->osi_cookie.lgc_lgl.lgl_oi.oi_fid), + osi->osi_cookie.lgc_lgl.lgl_ogen, + osi->osi_cookie.lgc_index, rc); atomic_inc(&d->opd_syn_changes); } /* return 0 always here, error case just cause no llog record */ @@ -1305,9 +1305,9 @@ static int osp_sync_llog_init(const struct lu_env *env, struct osp_device *d) rc = 0; } - CDEBUG(D_INFO, "%s: Init llog for %d - catid "DOSTID":%x\n", + CDEBUG(D_INFO, "%s: Init llog for %d - catid "DFID":%x\n", obd->obd_name, d->opd_index, - POSTID(&osi->osi_cid.lci_logid.lgl_oi), + PFID(&osi->osi_cid.lci_logid.lgl_oi.oi_fid), osi->osi_cid.lci_logid.lgl_ogen); rc = llog_setup(env, obd, &obd->obd_olg, LLOG_MDS_OST_ORIG_CTXT, diff --git a/lustre/target/update_trans.c b/lustre/target/update_trans.c index 3909872..031c49c 100644 --- a/lustre/target/update_trans.c +++ b/lustre/target/update_trans.c @@ -87,8 +87,8 @@ static void top_multiple_thandle_dump(struct top_multiple_thandle *tmt, st->st_committed, st->st_stopped, st->st_sub_th); list_for_each_entry(stc, &st->st_cookie_list, stc_list) { - CDEBUG(mask, " cookie "DOSTID": %u\n", - POSTID(&stc->stc_cookie.lgc_lgl.lgl_oi), + CDEBUG(mask, " cookie "DFID".%u\n", + PFID(&stc->stc_cookie.lgc_lgl.lgl_oi.oi_fid), stc->stc_cookie.lgc_index); } } @@ -210,9 +210,9 @@ static int sub_updates_write(const struct lu_env *env, rc = llog_add(env, ctxt->loc_handle, &record->lur_hdr, &stc->stc_cookie, sub_th->st_sub_th); - CDEBUG(D_INFO, "%s: Add update log "DOSTID":%u: rc = %d\n", + CDEBUG(D_INFO, "%s: Add update log "DFID".%u: rc = %d\n", dt->dd_lu_dev.ld_obd->obd_name, - POSTID(&stc->stc_cookie.lgc_lgl.lgl_oi), + PFID(&stc->stc_cookie.lgc_lgl.lgl_oi.oi_fid), stc->stc_cookie.lgc_index, rc); if (rc > 0) { @@ -290,9 +290,9 @@ static int sub_updates_write(const struct lu_env *env, rc = llog_add(env, ctxt->loc_handle, &lur->lur_hdr, &stc->stc_cookie, sub_th->st_sub_th); - CDEBUG(D_INFO, "%s: Add update log "DOSTID":%u rc = %d\n", + CDEBUG(D_INFO, "%s: Add update log "DFID".%u: rc = %d\n", dt->dd_lu_dev.ld_obd->obd_name, - POSTID(&stc->stc_cookie.lgc_lgl.lgl_oi), + PFID(&stc->stc_cookie.lgc_lgl.lgl_oi.oi_fid), stc->stc_cookie.lgc_index, rc); if (rc > 0) { @@ -1297,9 +1297,9 @@ static int distribute_txn_cancel_records(const struct lu_env *env, rc = llog_cat_cancel_records(env, ctxt->loc_handle, 1, cookie); CDEBUG(D_HA, "%s: batchid %llu cancel update log " - DOSTID ".%u : rc = %d\n", obd->obd_name, + DFID".%u: rc = %d\n", obd->obd_name, tmt->tmt_batchid, - POSTID(&cookie->lgc_lgl.lgl_oi), + PFID(&cookie->lgc_lgl.lgl_oi.oi_fid), cookie->lgc_index, rc); } -- 1.8.3.1