From: wangdi Date: Mon, 23 Oct 2006 13:57:00 +0000 (+0000) Subject: Branch: b_new_cmd X-Git-Tag: v1_8_0_110~486^2~378 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=a8db6271706d068336f14cac875a5d0bea536454;p=fs%2Flustre-release.git Branch: b_new_cmd since we already set no_need_trans for split. so remove this ugly hack for split. --- diff --git a/lustre/cmm/cmm_split.c b/lustre/cmm/cmm_split.c index a7ad53f..9192b7d 100644 --- a/lustre/cmm/cmm_split.c +++ b/lustre/cmm/cmm_split.c @@ -541,9 +541,10 @@ int cmm_try_to_split(const struct lu_env *env, struct md_object *mo) /* Step4: Set mea to the master object. */ rc = mo_xattr_set(env, md_object_next(mo), buf, MDS_LMV_MD_NAME, 0); - if (rc == -ERESTART) { + if (rc == 0) { CWARN("Dir "DFID" has been split\n", PFID(lu_object_fid(&mo->mo_lu))); + rc = -ERESTART; } EXIT; cleanup: diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index ac75ba6..029f9a6 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -831,19 +831,7 @@ static int mdd_xattr_set(const struct lu_env *env, struct md_object *obj, rc = mdd_xattr_set_txn(env, md2mdd_obj(obj), buf, name, fl, handle); -#ifdef HAVE_SPLIT_SUPPORT - if (rc == 0) { - /* - * XXX: Very ugly hack, if setting lmv, it means splitting - * sucess, we should return -ERESTART to notify the client, so - * transno for this splitting should be zero according to the - * replay rules. so return -ERESTART here let mdt trans stop - * callback know this. - */ - if (strncmp(name, MDS_LMV_MD_NAME, strlen(name)) == 0) - rc = -ERESTART; - } -#endif + mdd_trans_stop(env, mdd, rc, handle); RETURN(rc);