Whamcloud - gitweb
LU-15381 hsm: update size upon completion of data version 35/45935/4
authorQian Yingjin <qian@ddn.com>
Fri, 17 Dec 2021 08:53:37 +0000 (16:53 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 26 Jan 2022 05:16:26 +0000 (05:16 +0000)
commitdd3b5601ec6905b00d07cbcb8c139c46dd555b3b
tree3a865d60d8d41b4327b99fac0e03f457f17b200c
parent5663a852321f2a7a1439fa0e0d4e7d1cd4199498
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.

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>
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/llite/file.c
lustre/osc/osc_io.c
lustre/tests/sanity-hsm.sh