aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_receiver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd/drbd_receiver.c')
-rw-r--r--drivers/block/drbd/drbd_receiver.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 2f81821c2e06..360baf60f574 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -47,7 +47,6 @@
47#include <linux/string.h> 47#include <linux/string.h>
48#include <linux/scatterlist.h> 48#include <linux/scatterlist.h>
49#include "drbd_int.h" 49#include "drbd_int.h"
50#include "drbd_tracing.h"
51#include "drbd_req.h" 50#include "drbd_req.h"
52 51
53#include "drbd_vli.h" 52#include "drbd_vli.h"
@@ -350,8 +349,6 @@ struct drbd_epoch_entry *drbd_alloc_ee(struct drbd_conf *mdev,
350 e->epoch = NULL; 349 e->epoch = NULL;
351 e->flags = 0; 350 e->flags = 0;
352 351
353 trace_drbd_ee(mdev, e, "allocated");
354
355 return e; 352 return e;
356 353
357 fail2: 354 fail2:
@@ -366,7 +363,6 @@ struct drbd_epoch_entry *drbd_alloc_ee(struct drbd_conf *mdev,
366void drbd_free_ee(struct drbd_conf *mdev, struct drbd_epoch_entry *e) 363void drbd_free_ee(struct drbd_conf *mdev, struct drbd_epoch_entry *e)
367{ 364{
368 struct bio *bio = e->private_bio; 365 struct bio *bio = e->private_bio;
369 trace_drbd_ee(mdev, e, "freed");
370 drbd_pp_free_bio_pages(mdev, bio); 366 drbd_pp_free_bio_pages(mdev, bio);
371 bio_put(bio); 367 bio_put(bio);
372 D_ASSERT(hlist_unhashed(&e->colision)); 368 D_ASSERT(hlist_unhashed(&e->colision));
@@ -420,7 +416,6 @@ static int drbd_process_done_ee(struct drbd_conf *mdev)
420 * all ignore the last argument. 416 * all ignore the last argument.
421 */ 417 */
422 list_for_each_entry_safe(e, t, &work_list, w.list) { 418 list_for_each_entry_safe(e, t, &work_list, w.list) {
423 trace_drbd_ee(mdev, e, "process_done_ee");
424 /* list_del not necessary, next/prev members not touched */ 419 /* list_del not necessary, next/prev members not touched */
425 ok = e->w.cb(mdev, &e->w, !ok) && ok; 420 ok = e->w.cb(mdev, &e->w, !ok) && ok;
426 drbd_free_ee(mdev, e); 421 drbd_free_ee(mdev, e);
@@ -1021,8 +1016,6 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_conf *mdev,
1021 break; 1016 break;
1022 } 1017 }
1023 1018
1024 trace_drbd_epoch(mdev, epoch, ev);
1025
1026 if (epoch_size != 0 && 1019 if (epoch_size != 0 &&
1027 atomic_read(&epoch->active) == 0 && 1020 atomic_read(&epoch->active) == 0 &&
1028 test_bit(DE_HAVE_BARRIER_NUMBER, &epoch->flags) && 1021 test_bit(DE_HAVE_BARRIER_NUMBER, &epoch->flags) &&
@@ -1054,7 +1047,6 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_conf *mdev,
1054 list_del(&epoch->list); 1047 list_del(&epoch->list);
1055 ev = EV_BECAME_LAST | (ev & EV_CLEANUP); 1048 ev = EV_BECAME_LAST | (ev & EV_CLEANUP);
1056 mdev->epochs--; 1049 mdev->epochs--;
1057 trace_drbd_epoch(mdev, epoch, EV_TRACE_FREE);
1058 kfree(epoch); 1050 kfree(epoch);
1059 1051
1060 if (rv == FE_STILL_LIVE) 1052 if (rv == FE_STILL_LIVE)
@@ -1080,7 +1072,6 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_conf *mdev,
1080 struct flush_work *fw; 1072 struct flush_work *fw;
1081 fw = kmalloc(sizeof(*fw), GFP_ATOMIC); 1073 fw = kmalloc(sizeof(*fw), GFP_ATOMIC);
1082 if (fw) { 1074 if (fw) {
1083 trace_drbd_epoch(mdev, epoch, EV_TRACE_FLUSH);
1084 fw->w.cb = w_flush; 1075 fw->w.cb = w_flush;
1085 fw->epoch = epoch; 1076 fw->epoch = epoch;
1086 drbd_queue_work(&mdev->data.work, &fw->w); 1077 drbd_queue_work(&mdev->data.work, &fw->w);
@@ -1251,7 +1242,6 @@ static int receive_Barrier(struct drbd_conf *mdev, struct p_header *h)
1251 list_add(&epoch->list, &mdev->current_epoch->list); 1242 list_add(&epoch->list, &mdev->current_epoch->list);
1252 mdev->current_epoch = epoch; 1243 mdev->current_epoch = epoch;
1253 mdev->epochs++; 1244 mdev->epochs++;
1254 trace_drbd_epoch(mdev, epoch, EV_TRACE_ALLOC);
1255 } else { 1245 } else {
1256 /* The current_epoch got recycled while we allocated this one... */ 1246 /* The current_epoch got recycled while we allocated this one... */
1257 kfree(epoch); 1247 kfree(epoch);
@@ -1458,8 +1448,6 @@ static int recv_resync_read(struct drbd_conf *mdev, sector_t sector, int data_si
1458 list_add(&e->w.list, &mdev->sync_ee); 1448 list_add(&e->w.list, &mdev->sync_ee);
1459 spin_unlock_irq(&mdev->req_lock); 1449 spin_unlock_irq(&mdev->req_lock);
1460 1450
1461 trace_drbd_ee(mdev, e, "submitting for (rs)write");
1462 trace_drbd_bio(mdev, "Sec", e->private_bio, 0, NULL);
1463 drbd_generic_make_request(mdev, DRBD_FAULT_RS_WR, e->private_bio); 1451 drbd_generic_make_request(mdev, DRBD_FAULT_RS_WR, e->private_bio);
1464 /* accounting done in endio */ 1452 /* accounting done in endio */
1465 1453
@@ -1721,16 +1709,13 @@ static int receive_Data(struct drbd_conf *mdev, struct p_header *h)
1721 epoch = list_entry(e->epoch->list.prev, struct drbd_epoch, list); 1709 epoch = list_entry(e->epoch->list.prev, struct drbd_epoch, list);
1722 if (epoch == e->epoch) { 1710 if (epoch == e->epoch) {
1723 set_bit(DE_CONTAINS_A_BARRIER, &e->epoch->flags); 1711 set_bit(DE_CONTAINS_A_BARRIER, &e->epoch->flags);
1724 trace_drbd_epoch(mdev, e->epoch, EV_TRACE_ADD_BARRIER);
1725 rw |= (1<<BIO_RW_BARRIER); 1712 rw |= (1<<BIO_RW_BARRIER);
1726 e->flags |= EE_IS_BARRIER; 1713 e->flags |= EE_IS_BARRIER;
1727 } else { 1714 } else {
1728 if (atomic_read(&epoch->epoch_size) > 1 || 1715 if (atomic_read(&epoch->epoch_size) > 1 ||
1729 !test_bit(DE_CONTAINS_A_BARRIER, &epoch->flags)) { 1716 !test_bit(DE_CONTAINS_A_BARRIER, &epoch->flags)) {
1730 set_bit(DE_BARRIER_IN_NEXT_EPOCH_ISSUED, &epoch->flags); 1717 set_bit(DE_BARRIER_IN_NEXT_EPOCH_ISSUED, &epoch->flags);
1731 trace_drbd_epoch(mdev, epoch, EV_TRACE_SETTING_BI);
1732 set_bit(DE_CONTAINS_A_BARRIER, &e->epoch->flags); 1718 set_bit(DE_CONTAINS_A_BARRIER, &e->epoch->flags);
1733 trace_drbd_epoch(mdev, e->epoch, EV_TRACE_ADD_BARRIER);
1734 rw |= (1<<BIO_RW_BARRIER); 1719 rw |= (1<<BIO_RW_BARRIER);
1735 e->flags |= EE_IS_BARRIER; 1720 e->flags |= EE_IS_BARRIER;
1736 } 1721 }
@@ -1905,8 +1890,6 @@ static int receive_Data(struct drbd_conf *mdev, struct p_header *h)
1905 } 1890 }
1906 1891
1907 e->private_bio->bi_rw = rw; 1892 e->private_bio->bi_rw = rw;
1908 trace_drbd_ee(mdev, e, "submitting for (data)write");
1909 trace_drbd_bio(mdev, "Sec", e->private_bio, 0, NULL);
1910 drbd_generic_make_request(mdev, DRBD_FAULT_DT_WR, e->private_bio); 1893 drbd_generic_make_request(mdev, DRBD_FAULT_DT_WR, e->private_bio);
1911 /* accounting done in endio */ 1894 /* accounting done in endio */
1912 1895
@@ -2065,8 +2048,6 @@ static int receive_DataRequest(struct drbd_conf *mdev, struct p_header *h)
2065 2048
2066 inc_unacked(mdev); 2049 inc_unacked(mdev);
2067 2050
2068 trace_drbd_ee(mdev, e, "submitting for read");
2069 trace_drbd_bio(mdev, "Sec", e->private_bio, 0, NULL);
2070 drbd_generic_make_request(mdev, fault_type, e->private_bio); 2051 drbd_generic_make_request(mdev, fault_type, e->private_bio);
2071 maybe_kick_lo(mdev); 2052 maybe_kick_lo(mdev);
2072 2053
@@ -3543,9 +3524,6 @@ static void drbdd(struct drbd_conf *mdev)
3543 drbd_force_state(mdev, NS(conn, C_PROTOCOL_ERROR)); 3524 drbd_force_state(mdev, NS(conn, C_PROTOCOL_ERROR));
3544 break; 3525 break;
3545 } 3526 }
3546
3547 trace_drbd_packet(mdev, mdev->data.socket, 2, &mdev->data.rbuf,
3548 __FILE__, __LINE__);
3549 } 3527 }
3550} 3528}
3551 3529
@@ -3825,9 +3803,6 @@ static int drbd_do_handshake(struct drbd_conf *mdev)
3825 return 0; 3803 return 0;
3826 } 3804 }
3827 3805
3828 trace_drbd_packet(mdev, mdev->data.socket, 2, &mdev->data.rbuf,
3829 __FILE__, __LINE__);
3830
3831 p->protocol_min = be32_to_cpu(p->protocol_min); 3806 p->protocol_min = be32_to_cpu(p->protocol_min);
3832 p->protocol_max = be32_to_cpu(p->protocol_max); 3807 p->protocol_max = be32_to_cpu(p->protocol_max);
3833 if (p->protocol_max == 0) 3808 if (p->protocol_max == 0)
@@ -4420,14 +4395,11 @@ int drbd_asender(struct drbd_thread *thi)
4420 goto disconnect; 4395 goto disconnect;
4421 } 4396 }
4422 expect = cmd->pkt_size; 4397 expect = cmd->pkt_size;
4423 ERR_IF(len != expect-sizeof(struct p_header)) { 4398 ERR_IF(len != expect-sizeof(struct p_header))
4424 trace_drbd_packet(mdev, mdev->meta.socket, 1, (void *)h, __FILE__, __LINE__);
4425 goto reconnect; 4399 goto reconnect;
4426 }
4427 } 4400 }
4428 if (received == expect) { 4401 if (received == expect) {
4429 D_ASSERT(cmd != NULL); 4402 D_ASSERT(cmd != NULL);
4430 trace_drbd_packet(mdev, mdev->meta.socket, 1, (void *)h, __FILE__, __LINE__);
4431 if (!cmd->process(mdev, h)) 4403 if (!cmd->process(mdev, h))
4432 goto reconnect; 4404 goto reconnect;
4433 4405