Whamcloud - gitweb
LU-15381 hsm: update size upon completion of data version
authorQian Yingjin <qian@ddn.com>
Fri, 17 Dec 2021 08:53:37 +0000 (16:53 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 9 Mar 2022 17:39:35 +0000 (17:39 +0000)
commitc8210e24ded0922dc08b0667c3a4ca9f22f817f4
tree1decb747770ef64269577380cfbcdd87b5060071
parent97fcda3a53dc5347d545637b7a2a0c17fdaa37fd
LU-15381 hsm: update size upon completion of data version

We found a HSM retore followed by a HSM release will set the
file size with 0 wrongly during the tests.
The reason is that the file size and blocks information is
incorrect obtained via @ll_merger_attr().
The data version operation will flush dirty pages from all
clients, the size and blocks information returns from the Lustre
OST is correct.
In this patch, we update the size and block attributes for a file
upon the completion of the data version operation accordingly.
By this way, HSM release will set the size and blocks information
correctly after data version ioctl operation.

Add sanity-hsm test_261.

lustre-change: https://review.whamcloud.com/45935
lustre-commit: dd3b5601ec6905b00d07cbcb8c139c46dd555b3b

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Ifdbf6b58ecd00dc9677a2328438ef68529b72882
Reviewed-on: https://review.whamcloud.com/45935
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Artem Blagodarenko <artem.blagodarenko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/46336
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/llite/file.c
lustre/osc/osc_io.c
lustre/tests/sanity-hsm.sh