From: yury Date: Tue, 21 Oct 2008 15:58:24 +0000 (+0000) Subject: b=17353 X-Git-Tag: v1_7_130~1^92 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c2c408d6b60dacfbb89c974f677821c2e5771fc9;p=fs%2Flustre-release.git b=17353 r=shadow,wangdi - fixed llog issue leading to potential data loss on OST. --- diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 4eb05f8..de1482c 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -3222,8 +3222,6 @@ static int filter_precreate(struct obd_device *obd, struct obdo *oa, } else next_id = filter_last_id(filter, group) + 1; - CDEBUG(D_INFO, "precreate objid "LPU64"\n", next_id); - dparent = filter_parent_lock(obd, group, next_id); if (IS_ERR(dparent)) GOTO(cleanup, rc = PTR_ERR(dparent)); @@ -3269,6 +3267,10 @@ static int filter_precreate(struct obd_device *obd, struct obdo *oa, GOTO(cleanup, rc = PTR_ERR(handle)); cleanup_phase = 3; + CDEBUG(D_INODE, "%s: filter_precreate(od->o_gr="LPU64 + ",od->o_id="LPU64")\n", obd->obd_name, group, + next_id); + /* We mark object SUID+SGID to flag it for accepting UID+GID * from client on first write. Currently the permission bits * on the OST are never used, so this is OK. */ @@ -3375,7 +3377,7 @@ int filter_recreate(struct obd_device *obd, struct obdo *oa) static int filter_create(struct obd_export *exp, struct obdo *oa, struct lov_stripe_md **ea, struct obd_trans_info *oti) { - struct obd_device *obd = NULL; + struct obd_device *obd = exp->exp_obd; struct lvfs_run_ctxt saved; struct lov_stripe_md *lsm = NULL; struct ldlm_res_id res_id = { .name = { oa->o_id } }; @@ -3385,6 +3387,9 @@ static int filter_create(struct obd_export *exp, struct obdo *oa, int rc = 0; ENTRY; + CDEBUG(D_INODE, "%s: filter_create(od->o_gr="LPU64",od->o_id=" + LPU64")\n", obd->obd_name, oa->o_gr, oa->o_id); + if (!(oa->o_valid & OBD_MD_FLGROUP)) oa->o_gr = 0; @@ -3398,7 +3403,6 @@ static int filter_create(struct obd_export *exp, struct obdo *oa, } } - obd = exp->exp_obd; push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); if ((oa->o_valid & OBD_MD_FLFLAGS) && @@ -3456,6 +3460,9 @@ int filter_destroy(struct obd_export *exp, struct obdo *oa, push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); cleanup_phase = 1; + CDEBUG(D_INODE, "%s: filter_destroy(od->o_gr="LPU64",od->o_id=" + LPU64")\n", obd->obd_name, oa->o_gr, oa->o_id); + dchild = filter_fid2dentry(obd, NULL, oa->o_gr, oa->o_id); if (IS_ERR(dchild)) GOTO(cleanup, rc = PTR_ERR(dchild));