Whamcloud - gitweb
b=7340
authoralex <alex>
Fri, 16 Sep 2005 09:47:58 +0000 (09:47 +0000)
committeralex <alex>
Fri, 16 Sep 2005 09:47:58 +0000 (09:47 +0000)
 - setup cr_replayid immediately because it might take long to get to
   mdc_set_open_replay_data() and replay can happen in meantime

lustre/mdc/mdc_locks.c
lustre/mdc/mdc_request.c

index ecb0869..3ea5fb7 100644 (file)
@@ -428,6 +428,9 @@ int mdc_enqueue(struct obd_export *exp,
                         RETURN (-EPROTO);
                 }
 
+                if ((it->it_op & IT_OPEN) && (LUSTRE_IT(it)->it_status >= 0))
+                        mdc_store_inode_generation(exp, req, MDS_REQ_INTENT_REC_OFF, 1);
+
                 if ((body->valid & OBD_MD_FLEASIZE) != 0) {
                         /* The eadata is opaque; just check that it is there.
                          * Eventually, obd_unpackmd() will check the contents */
index bf15b7f..7ab0247 100644 (file)
@@ -673,6 +673,10 @@ int mdc_set_open_replay_data(struct obd_export *exp,
         mod->mod_och = och;
         mod->mod_open_req = ptlrpc_request_addref(open_req);
 
+        if (memcmp(&rec->cr_replayid, &body->id1, sizeof(rec->cr_replayid)))
+                CDEBUG(D_ERROR, DLID4" != "DLID4"\n", OLID4(&rec->cr_replayid),
+                       OLID4(&body->id1));
+                        
         memcpy(&rec->cr_replayid, &body->id1, sizeof rec->cr_replayid);
         memcpy(&rec->cr_ioepoch, &body->io_epoch, sizeof rec->cr_ioepoch);
         open_req->rq_replay_cb = mdc_replay_open;