Whamcloud - gitweb
LU-15840 lov: return st_blocks=1 for HSM released files
authorQian Yingjin <qian@ddn.com>
Wed, 11 May 2022 08:21:12 +0000 (16:21 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 31 May 2022 15:51:48 +0000 (15:51 +0000)
commit4beab26166de68dc9279e75961d5a99f92c53a57
tree1ed740e5dee907140e5858f55c0741e342ef090e
parentf9970c0a704c4f1c70a21d416284ce91cf4c102b
LU-15840 lov: return st_blocks=1 for HSM released files

The MDT will return st_blocks=1 for a HSM released file.
In the call ->coo_attr_get in LOV layer, the client should also
return st_blocks=1 for a HSM released file.

Otherwise, the client may get 0 block count. It is very easy to
reproduce this problem via the following commands for a archived
file:
# $LFS hsm_restore $file
# $LFS hsm_release $file
# $LFS hsm_release $file
After release a file twice, the reported block count via stat()
call will become 0.

Lustre-change: https://review.whamcloud.com/47291
Lustre-commit: TBD (from 974320c61ee7d165073bb2810795575261996dc7)

Change-Id: Id1841147e40a7df0ca615e887f324cff8e613f11
Signed-off-by: Qian Yingjin <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/47290
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/lov/lov_object.c
lustre/tests/sanity-hsm.sh