[DRBD-cvs] svn commit by lars - r2378 - trunk/drbd - CAUTION:
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Sat Aug 19 18:49:59 CEST 2006
checkin of broken code. well, I'ts not newly b
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: lars
Date: 2006-08-19 18:49:58 +0200 (Sat, 19 Aug 2006)
New Revision: 2378
Modified:
trunk/drbd/drbd_receiver.c
trunk/drbd/drbd_req.c
trunk/drbd/drbd_worker.c
Log:
CAUTION:
checkin of broken code. well, I'ts not newly broken,
I just point out where it is broken.
I don't think adding several band aids in various places is the way to go, so
I'm going to work on a new implementation of the req "state machine" next.
Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c 2006-08-18 16:13:50 UTC (rev 2377)
+++ trunk/drbd/drbd_receiver.c 2006-08-19 16:49:58 UTC (rev 2378)
@@ -1100,7 +1100,7 @@
sector = be64_to_cpu(p->sector);
- req = (drbd_request_t *)(long)p->block_id;
+ req = (drbd_request_t *)(unsigned long)p->block_id;
if(unlikely(!drbd_pr_verify(mdev,req,sector))) {
ERR("Got a corrupt block_id/sector pair(1).\n");
return FALSE;
Modified: trunk/drbd/drbd_req.c
===================================================================
--- trunk/drbd/drbd_req.c 2006-08-18 16:13:50 UTC (rev 2377)
+++ trunk/drbd/drbd_req.c 2006-08-19 16:49:58 UTC (rev 2378)
@@ -94,6 +94,11 @@
if(tl_dependence(mdev,req))
set_bit(ISSUE_BARRIER,&mdev->flags);
} else {
+ /* FIXME not longer true!
+ * we don't have the tl_lock here anymore...
+ * sorry sir.
+ **/
+ MUST_HOLD(&mdev->tl_lock);
list_del(&req->tl_requests); // we have the tl_lock...
hlist_del(&req->colision);
// req->barrier->n_req--; // Barrier migh be free'ed !
Modified: trunk/drbd/drbd_worker.c
===================================================================
--- trunk/drbd/drbd_worker.c 2006-08-18 16:13:50 UTC (rev 2377)
+++ trunk/drbd/drbd_worker.c 2006-08-19 16:49:58 UTC (rev 2378)
@@ -576,18 +576,16 @@
sector = drbd_req_get_sector(req);
size = drbd_req_get_size(req);
- drbd_end_req(req,RQ_DRBD_SENT,1, sector);
+ drbd_end_req(req,RQ_DRBD_SENT|RQ_DRBD_ON_WIRE,1, sector);
drbd_set_out_of_sync(mdev, sector, size);
return 1;
}
+ inc_ap_pending(mdev);
ok = drbd_send_dblock(mdev,req);
+ drbd_end_req(req,RQ_DRBD_ON_WIRE,1,drbd_req_get_sector(req));
if (ok) {
- inc_ap_pending(mdev);
-
- drbd_end_req(req,RQ_DRBD_ON_WIRE,1,drbd_req_get_sector(req));
-
if(mdev->net_conf->wire_protocol == DRBD_PROT_A) {
dec_ap_pending(mdev);
drbd_end_req(req, RQ_DRBD_SENT, 1,
More information about the drbd-cvs
mailing list