From: alex Date: Wed, 21 Sep 2005 12:40:32 +0000 (+0000) Subject: - swab capa data in mdc_replay_open(), the sequence can be: X-Git-Tag: 1.4.10~445 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=715ebd0b22c375c72859372622bf83006257ea6c;p=fs%2Flustre-release.git - 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 --- 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");