From 715ebd0b22c375c72859372622bf83006257ea6c Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 21 Sep 2005 12:40:32 +0000 Subject: [PATCH] - swab capa data in mdc_replay_open(), the sequence can be: 1) ll_file_open() has a request with capa 2) the inode is already opened, so we close just received openhandle 3) mds fails, recovers, ptlrpcd replays open request 4) ll_set_capa() finds capa in replayed open request non-swabbed - BUG --- lustre/mdc/mdc_request.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index b386463..cbc55b9 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -613,6 +613,12 @@ static void mdc_replay_open(struct ptlrpc_request *req) body = lustre_swab_repbuf(req, 1, sizeof(*body), lustre_swab_mds_body); LASSERT (body != NULL); + + if (body->valid & OBD_MD_CAPA) { + DEBUG_REQ(D_HA, req, "swap capa data from open"); + lustre_swab_repbuf(req, 7, sizeof(struct lustre_capa), + lustre_swab_lustre_capa); + } if (mod == NULL) { DEBUG_REQ(D_ERROR, req, "can't properly replay without open data"); -- 1.8.3.1