b->blocks = 0;
/* if no object is allocated on osts, the size on mds is valid. b=22272 */
b->valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
- }
+ } else if ((ma->ma_valid & MA_LOV) && ma->ma_lmm &&
+ (ma->ma_lmm->lmm_pattern & LOV_PATTERN_F_RELEASED)) {
+ /* A released file stores its size on MDS. */
+ b->blocks = 0;
+ b->valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
+ }
if (fid) {
b->fid1 = *fid;
RETURN(rc);
}
+ /* if file is released, check if a restore is running */
+ if ((ma->ma_valid & MA_HSM) && (ma->ma_hsm.mh_flags & HS_RELEASED) &&
+ mdt_hsm_restore_is_running(info, mdt_object_fid(o))) {
+ repbody->t_state = MS_RESTORE;
+ repbody->valid |= OBD_MD_TSTATE;
+ }
+
is_root = lu_fid_eq(mdt_object_fid(o), &info->mti_mdt->mdt_md_root_fid);
/* the Lustre protocol supposes to return default striping