From: Lai Siyao Date: Fri, 22 Sep 2017 02:42:07 +0000 (+0800) Subject: LU-5024 mdc: don't assert on name pack X-Git-Tag: 2.10.56~48 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=dd9d7cc845dfd2853498091573b7e13a0a35c161;p=fs%2Flustre-release.git LU-5024 mdc: don't assert on name pack For old version of MDTs which don't support ATTRFID, open will pack dentry name in the request, but this name may change if there is concurrent rename, as a result an assertion will be triggerred. It's inconvenient to copy name in advance or take dentry lock in the call chain, so It's better to remove this assert, which is safe. Signed-off-by: Lai Siyao Change-Id: I58d8b8fbbd8057aa2e8618e8923d0432f31dac96 Reviewed-on: https://review.whamcloud.com/29161 Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond --- diff --git a/lustre/mdc/mdc_lib.c b/lustre/mdc/mdc_lib.c index b38c91c..459f9f4 100644 --- a/lustre/mdc/mdc_lib.c +++ b/lustre/mdc/mdc_lib.c @@ -116,7 +116,11 @@ static void mdc_pack_name(struct ptlrpc_request *req, cpy_len = strlcpy(buf, name, buf_size); - LASSERT(cpy_len == name_len && lu_name_is_valid_2(buf, cpy_len)); + LASSERT(lu_name_is_valid_2(buf, cpy_len)); + if (cpy_len != name_len) + CDEBUG(D_DENTRY, "%s: %s len %zd != %zd, concurrent rename?\n", + req->rq_export->exp_obd->obd_name, buf, name_len, + cpy_len); } void mdc_file_secctx_pack(struct ptlrpc_request *req, const char *secctx_name,