Whamcloud - gitweb
LU-15840 lov: return st_blocks=1 for HSM released files 91/47291/4
authorQian Yingjin <qian@ddn.com>
Wed, 11 May 2022 08:21:12 +0000 (16:21 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 2 Apr 2024 20:59:27 +0000 (20:59 +0000)
commit5ee13823a43ee41849ca65d4c65f07e0c7cc5cf2
tree6689b49a549b4475f405b159d5ebadfce1f4d54b
parente92c2d26be2e84b64cda8d1c8af3cc815d388382
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>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47291
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
lustre/lov/lov_object.c
lustre/tests/sanity-hsm.sh