Whamcloud - gitweb
LU-15840 lov: return st_blocks=1 for HSM released files 91/47291/2
authorQian Yingjin <qian@ddn.com>
Wed, 11 May 2022 08:21:12 +0000 (16:21 +0800)
committerQian Yingjin <qian@ddn.com>
Wed, 11 May 2022 08:58:44 +0000 (16:58 +0800)
commit974320c61ee7d165073bb2810795575261996dc7
tree83f2a2f1b905731a6ef0aaec058738371c09f4d4
parent5879647624c834d4a579f425a0fc8d408235e275
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.

Change-Id: Id1841147e40a7df0ca615e887f324cff8e613f11
Signed-off-by: Qian Yingjin <qian@ddn.com>
lustre/lov/lov_object.c
lustre/tests/sanity-hsm.sh