if the source object is remote, then we should revlidate it
once the object's ldlm lock is granted. otherwise we can't
use the object's attributes:
lu_object_attr())
ASSERTION( ((o)->lo_header->loh_attr & LOHA_EXISTS) != 0
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I9896cdd011f858091ac68b50b74e2f1f027f7331
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53087
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
if (rc)
GOTO(unlock_links, rc);
+ if (mdt_object_remote(sobj)) {
+ struct md_attr *ma2 = &info->mti_attr2;
+ ma2->ma_need = MA_INODE;
+ rc = mo_attr_get(env, mdt_object_child(sobj), ma2);
+ if (rc)
+ GOTO(unlock_source, rc);
+ }
+
if (S_ISREG(lu_object_attr(&sobj->mot_obj))) {
/* TODO: DoM migration is not supported, migrate dirent only */
rc = mdt_stripe_get(info, sobj, ma, XATTR_NAME_LOV);