Whamcloud - gitweb
LU-13852 pcc: don't alloc FID in LLITE for pcc open 68/39568/11
authorLai Siyao <lai.siyao@whamcloud.com>
Fri, 31 Jul 2020 18:09:06 +0000 (02:09 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 27 May 2021 18:17:38 +0000 (18:17 +0000)
commit223728a97c397e6e6c91808dd36a2539705f00b8
tree983f7d58e70b07e3f0f37fe95161f26b916e7d98
parentcd2ad336177f8f3130de264709dc326349a22b23
LU-13852 pcc: don't alloc FID in LLITE for pcc open

ll_lookup_it(IT_OPEN) always alloc FID on MDT0 for pcc open, but
the open request is sent to MDT where the name hash points to,
which may be different from the MDT where the FID is, which will
trigger osp_md_create() assertion because file is created remotely.

This FID allocation is not necessary, and it can be left to be done
in lmv_intent_open() by LMV layer, because the MDT is chosen in
LMV. Then when it's done, the FID allocated can be used to initialize
PCC inode.

Change assertion in osp_md_create() to error message and return
error.

Update sanity-sec 2a for this.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I3ccea3f9e7cca5083695c71135b9a5805f833b14
Reviewed-on: https://review.whamcloud.com/39568
Reviewed-by: Yingjin Qian <qian@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/namei.c
lustre/lmv/lmv_intent.c
lustre/osp/osp_md_object.c
lustre/tests/sanity-pcc.sh