Whamcloud - gitweb
LU-5024 mdc: don't assert on name pack 55/30355/2
authorLai Siyao <lai.siyao@intel.com>
Fri, 22 Sep 2017 02:42:07 +0000 (10:42 +0800)
committerJohn L. Hammond <john.hammond@intel.com>
Mon, 12 Mar 2018 18:16:51 +0000 (18:16 +0000)
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.

Lustre-change: https://review.whamcloud.com/29161
Lustre-commit: dd9d7cc845dfd2853498091573b7e13a0a35c161

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I58d8b8fbbd8057aa2e8618e8923d0432f31dac96
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30355
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/mdc/mdc_lib.c

index 200e7e7..f02a8de 100644 (file)
@@ -117,7 +117,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,