Whamcloud - gitweb
LU-13852 pcc: don't alloc FID in LLITE for pcc open
authorLai Siyao <lai.siyao@whamcloud.com>
Fri, 31 Jul 2020 18:09:06 +0000 (02:09 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 4 Aug 2021 17:25:27 +0000 (17:25 +0000)
commit697da2dfdff61e00fafd3b20f03436ecc7e02385
treed31b6162e3672637546e46d504b35465df7ccd34
parent49ab1509427738607c8a0be1f7bb94a952c98ea3
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.

Lustre-change: https://review.whamcloud.com/39568
Lustre-commit: 223728a97c397e6e6c91808dd36a2539705f00b8

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