From 89b255b1e76cab8cad13826a88c86b7d762b285f Mon Sep 17 00:00:00 2001 From: yury Date: Mon, 16 Oct 2006 07:04:14 +0000 Subject: [PATCH] - fixes in init mdt_thread_info. --- lustre/mdt/mdt_handler.c | 4 +++- lustre/mdt/mdt_internal.h | 5 +++-- lustre/mdt/mdt_lib.c | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 2a609a0..eecb1f0 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -1750,8 +1750,10 @@ static void mdt_thread_info_init(struct ptlrpc_request *req, info->mti_mdt = NULL; req_capsule_init(&info->mti_pill, req, RCL_SERVER, info->mti_rep_buf_size); - memset(&info->mti_attr, 0, sizeof info->mti_attr); + memset(&info->mti_attr, 0, sizeof(info->mti_attr)); + memset(&info->mti_policy, 0, sizeof(info->mti_policy)); info->mti_has_trans = 0; + info->mti_opdata = 0; info->mti_no_need_trans = 0; info->mti_object = NULL; diff --git a/lustre/mdt/mdt_internal.h b/lustre/mdt/mdt_internal.h index d0420b8..b5f04f5 100644 --- a/lustre/mdt/mdt_internal.h +++ b/lustre/mdt/mdt_internal.h @@ -237,7 +237,8 @@ enum { */ struct mdt_thread_info { /* - * for req-layout interface. + * for req-layout interface. This field should be first to compatibility + * with seq and fld suff. */ struct req_capsule mti_pill; @@ -317,7 +318,7 @@ struct mdt_thread_info { } mti_u; /* IO epoch related stuff. */ - struct mdt_epoch *mti_epoch; + struct mdt_epoch *mti_epoch; __u64 mti_replayepoch; /* server and client data buffers */ diff --git a/lustre/mdt/mdt_lib.c b/lustre/mdt/mdt_lib.c index e5cf202..b7f2e23 100644 --- a/lustre/mdt/mdt_lib.c +++ b/lustre/mdt/mdt_lib.c @@ -968,9 +968,9 @@ static reint_unpacker mdt_reint_unpackers[REINT_MAX] = { int mdt_reint_unpack(struct mdt_thread_info *info, __u32 op) { int rc; - ENTRY; + memset(&info->mti_rr, 0, sizeof(info->mti_rr)); if (op < REINT_MAX && mdt_reint_unpackers[op] != NULL) { info->mti_rr.rr_opcode = op; rc = mdt_reint_unpackers[op](info); -- 1.8.3.1