Whamcloud - gitweb
LU-14393 recovery: reply reconstruction for batched RPCs 28/48228/13
authorQian Yingjin <qian@ddn.com>
Tue, 16 Aug 2022 07:57:47 +0000 (03:57 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 27 Jan 2023 00:31:33 +0000 (00:31 +0000)
commit178988d67aa2f83aa65badc81e305fac0328838d
tree75c92a3aeba2d72bd3c3046535a1e7556abf31f6
parent840274b5c5e95e44a5ffedd08ebb4727bc39a845
LU-14393 recovery: reply reconstruction for batched RPCs

Batched RPC can boost the metadata performance for Lustre
dramatically. However, it also increases the complexity of the
recovery, such as how to reconstruct the reply in case of the RPC
resend if the reply was lost.

In this patch, it adds a new field @lrd_batch_idx in the data
structure @lsd_reply_data to store each slot of the "reply_data"
file:
struct lsd_reply_data {
__u64 lrd_transno; /* transaction number */
__u64 lrd_xid; /* transmission id */
__u64 lrd_data; /* per-operation data */
__u32 lrd_result; /* request result */
__u32 lrd_client_gen; /* client generation */
__u32 lrd_batch_idx; /* index in a batched RPC */
__u32 lrd_padding[7]; /* unused fields */
};

When found that a batched RPC was a resend RPC request, and if
the index of the sub request in the batched RPC is smaller or
equal than @lrd_batch_idx in the reply data, it means that the sub
request has already executed, the server will reconstruct the
reply for this sub request; if the index is larger than
@lrd_batch_idx, the server will re-execute the sub reqeust in the
batched RPC.

Disable conf-sanity/32{a,b,c,d,e,f,g}, 108{a,b} temporarily until
the compatibility issue during upgrade for new reply data format
is fixed.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Id48ecc263002cb783f5032642d05e1f3f6673837
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48228
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lu_target.h
lustre/include/obd_support.h
lustre/include/uapi/linux/lustre/lustre_disk.h
lustre/mdt/mdt_batch.c
lustre/mdt/mdt_recovery.c
lustre/ptlrpc/batch.c
lustre/target/out_handler.c
lustre/target/tgt_handler.c
lustre/target/tgt_lastrcvd.c
lustre/target/tgt_main.c
lustre/tests/conf-sanity.sh