Whamcloud - gitweb
- swab capa data in mdc_replay_open(), the sequence can be:
authoralex <alex>
Wed, 21 Sep 2005 12:40:32 +0000 (12:40 +0000)
committeralex <alex>
Wed, 21 Sep 2005 12:40:32 +0000 (12:40 +0000)
  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

index b386463..cbc55b9 100644 (file)
@@ -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");