From d8e061b1162ee7e84dce02dd23e870c917bed142 Mon Sep 17 00:00:00 2001 From: huanghua Date: Tue, 12 Sep 2006 17:43:49 +0000 Subject: [PATCH] (1) fix a bug about transaction credit; (2) fix some typo; --- lustre/mdt/mdt_open.c | 7 +++---- lustre/mdt/mdt_recovery.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lustre/mdt/mdt_open.c b/lustre/mdt/mdt_open.c index 4ad6472..4278d8d 100644 --- a/lustre/mdt/mdt_open.c +++ b/lustre/mdt/mdt_open.c @@ -181,8 +181,7 @@ static void mdt_open_transno(struct mdt_thread_info* info) struct ptlrpc_request *req = mdt_info_req(info); if (info->mti_transno != 0) { - /* This request has created something, so we have transno */ - CDEBUG(D_INODE, "open | create: transno = %llu," + CDEBUG(D_INODE, "(open | create) | replay: transno = %llu," " last_committed = %llu\n", info->mti_transno, req->rq_export->exp_obd->obd_last_committed); @@ -312,7 +311,7 @@ static int mdt_mfd_open(struct mdt_thread_info *info, /* keep a reference on this object for this open, * and is released by mdt_mfd_close() */ mdt_object_get(info->mti_ctxt, o); - /* open hanling */ + /* open handling */ mfd->mfd_mode = flags; mfd->mfd_object = o; @@ -675,7 +674,7 @@ int mdt_open(struct mdt_thread_info *info) if (result == -ESTALE) { /*ESTALE means the parent is a dead(unlinked) dir, *so it should return -ENOENT to in accordance - *with the original mds implemantaion.*/ + *with the original mds implementaion.*/ GOTO(out_parent, result = -ENOENT); } if (!(create_flags & MDS_OPEN_CREAT)) diff --git a/lustre/mdt/mdt_recovery.c b/lustre/mdt/mdt_recovery.c index fd73f63..8ea1c16 100644 --- a/lustre/mdt/mdt_recovery.c +++ b/lustre/mdt/mdt_recovery.c @@ -83,6 +83,7 @@ static struct thandle* mdt_trans_start(const struct lu_context *ctx, mti = lu_context_key_get(ctx, &mdt_thread_key); p = &mti->mti_txn_param; + p->tp_credits = MDT_TXN_WRITE_RECORD_CREDITS; return mdt->mdt_bottom->dd_ops->dt_trans_start(ctx, mdt->mdt_bottom, p); } @@ -187,7 +188,6 @@ static int mdt_last_rcvd_header_write(const struct lu_context *ctx, mti = lu_context_key_get(ctx, &mdt_thread_key); - mti->mti_txn_param.tp_credits = MDT_TXN_WRITE_RECORD_CREDITS; th = mdt_trans_start(ctx, mdt); if (IS_ERR(th)) RETURN(PTR_ERR(th)); -- 1.8.3.1