Whamcloud - gitweb
LU-16096 recovery: upgrade reply data after recovery finish 61/48261/15
authorQian Yingjin <qian@ddn.com>
Fri, 19 Aug 2022 02:32:36 +0000 (22:32 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 31 Jan 2023 02:33:35 +0000 (02:33 +0000)
commitbbf0017fdea52f094c190f14fd82b9f5d0902c90
tree3c76b250d85eb344466d802be946cc6913013ef3
parent6594babc73851fab335c514cd1fee018425e7bb3
LU-16096 recovery: upgrade reply data after recovery finish

As the batched RPC protocol will change the disk format of the
client reply data "REPLY_DATA" for recovery, thus we need to
handle the compatibility during upgrade carefully for this new
format change of the reply data.

The solution is as follows:
When the client recovery has finished, the target truncates the
reply data file with zero size and rewrite the header to use the
new magic and reply data record size.
And then new reply data records will be written in the new format.

Enable the test case conf-sanity/32, 108 as the compatibility issue
is fixed.

This patch also fixes the usage of struct lsd_reply_data in
lustre/utils/lr_reader.c to support both struct versions.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I26921d41915b8cad2d913e15f502f4543180c5c6
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48261
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_disk.h
lustre/target/tgt_lastrcvd.c
lustre/tests/conf-sanity.sh
lustre/utils/lr_reader.c