aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_main.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-10-01 03:04:14 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-10-01 15:17:58 -0400
commit6a0afdf58d40200abd0c717261d1bc4c49195c2f (patch)
tree9ff7ca32d16e6ddb774105528fe051bd04695b3d /drivers/block/drbd/drbd_main.c
parentab8fafc2e1ecc0090f2c78902d3b992eec8b11f8 (diff)
drbd: remove tracing bits
They should be reimplemented in the current scheme. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r--drivers/block/drbd/drbd_main.c36
1 files changed, 1 insertions, 35 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 80273f21a4aa..11d8ff6016ac 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -53,7 +53,6 @@
53 53
54#include <linux/drbd_limits.h> 54#include <linux/drbd_limits.h>
55#include "drbd_int.h" 55#include "drbd_int.h"
56#include "drbd_tracing.h"
57#include "drbd_req.h" /* only for _req_mod in tl_release and tl_clear */ 56#include "drbd_req.h" /* only for _req_mod in tl_release and tl_clear */
58 57
59#include "drbd_vli.h" 58#include "drbd_vli.h"
@@ -80,18 +79,6 @@ static int w_md_sync(struct drbd_conf *mdev, struct drbd_work *w, int unused);
80static void md_sync_timer_fn(unsigned long data); 79static void md_sync_timer_fn(unsigned long data);
81static int w_bitmap_io(struct drbd_conf *mdev, struct drbd_work *w, int unused); 80static int w_bitmap_io(struct drbd_conf *mdev, struct drbd_work *w, int unused);
82 81
83DEFINE_TRACE(drbd_unplug);
84DEFINE_TRACE(drbd_uuid);
85DEFINE_TRACE(drbd_ee);
86DEFINE_TRACE(drbd_packet);
87DEFINE_TRACE(drbd_md_io);
88DEFINE_TRACE(drbd_epoch);
89DEFINE_TRACE(drbd_netlink);
90DEFINE_TRACE(drbd_actlog);
91DEFINE_TRACE(drbd_bio);
92DEFINE_TRACE(_drbd_resync);
93DEFINE_TRACE(drbd_req);
94
95MODULE_AUTHOR("Philipp Reisner <phil@linbit.com>, " 82MODULE_AUTHOR("Philipp Reisner <phil@linbit.com>, "
96 "Lars Ellenberg <lars@linbit.com>"); 83 "Lars Ellenberg <lars@linbit.com>");
97MODULE_DESCRIPTION("drbd - Distributed Replicated Block Device v" REL_VERSION); 84MODULE_DESCRIPTION("drbd - Distributed Replicated Block Device v" REL_VERSION);
@@ -1576,7 +1563,6 @@ int _drbd_send_cmd(struct drbd_conf *mdev, struct socket *sock,
1576 h->command = cpu_to_be16(cmd); 1563 h->command = cpu_to_be16(cmd);
1577 h->length = cpu_to_be16(size-sizeof(struct p_header)); 1564 h->length = cpu_to_be16(size-sizeof(struct p_header));
1578 1565
1579 trace_drbd_packet(mdev, sock, 0, (void *)h, __FILE__, __LINE__);
1580 sent = drbd_send(mdev, sock, h, size, msg_flags); 1566 sent = drbd_send(mdev, sock, h, size, msg_flags);
1581 1567
1582 ok = (sent == size); 1568 ok = (sent == size);
@@ -1628,8 +1614,6 @@ int drbd_send_cmd2(struct drbd_conf *mdev, enum drbd_packets cmd, char *data,
1628 if (!drbd_get_data_sock(mdev)) 1614 if (!drbd_get_data_sock(mdev))
1629 return 0; 1615 return 0;
1630 1616
1631 trace_drbd_packet(mdev, mdev->data.socket, 0, (void *)&h, __FILE__, __LINE__);
1632
1633 ok = (sizeof(h) == 1617 ok = (sizeof(h) ==
1634 drbd_send(mdev, mdev->data.socket, &h, sizeof(h), 0)); 1618 drbd_send(mdev, mdev->data.socket, &h, sizeof(h), 0));
1635 ok = ok && (size == 1619 ok = ok && (size ==
@@ -2359,7 +2343,6 @@ int drbd_send_dblock(struct drbd_conf *mdev, struct drbd_request *req)
2359 dp_flags |= DP_MAY_SET_IN_SYNC; 2343 dp_flags |= DP_MAY_SET_IN_SYNC;
2360 2344
2361 p.dp_flags = cpu_to_be32(dp_flags); 2345 p.dp_flags = cpu_to_be32(dp_flags);
2362 trace_drbd_packet(mdev, mdev->data.socket, 0, (void *)&p, __FILE__, __LINE__);
2363 set_bit(UNPLUG_REMOTE, &mdev->flags); 2346 set_bit(UNPLUG_REMOTE, &mdev->flags);
2364 ok = (sizeof(p) == 2347 ok = (sizeof(p) ==
2365 drbd_send(mdev, mdev->data.socket, &p, sizeof(p), MSG_MORE)); 2348 drbd_send(mdev, mdev->data.socket, &p, sizeof(p), MSG_MORE));
@@ -2410,7 +2393,6 @@ int drbd_send_block(struct drbd_conf *mdev, enum drbd_packets cmd,
2410 if (!drbd_get_data_sock(mdev)) 2393 if (!drbd_get_data_sock(mdev))
2411 return 0; 2394 return 0;
2412 2395
2413 trace_drbd_packet(mdev, mdev->data.socket, 0, (void *)&p, __FILE__, __LINE__);
2414 ok = sizeof(p) == drbd_send(mdev, mdev->data.socket, &p, 2396 ok = sizeof(p) == drbd_send(mdev, mdev->data.socket, &p,
2415 sizeof(p), MSG_MORE); 2397 sizeof(p), MSG_MORE);
2416 if (ok && dgs) { 2398 if (ok && dgs) {
@@ -2546,8 +2528,6 @@ static void drbd_unplug_fn(struct request_queue *q)
2546{ 2528{
2547 struct drbd_conf *mdev = q->queuedata; 2529 struct drbd_conf *mdev = q->queuedata;
2548 2530
2549 trace_drbd_unplug(mdev, "got unplugged");
2550
2551 /* unplug FIRST */ 2531 /* unplug FIRST */
2552 spin_lock_irq(q->queue_lock); 2532 spin_lock_irq(q->queue_lock);
2553 blk_remove_plug(q); 2533 blk_remove_plug(q);
@@ -3252,8 +3232,6 @@ void drbd_md_sync(struct drbd_conf *mdev)
3252 if (!get_ldev_if_state(mdev, D_FAILED)) 3232 if (!get_ldev_if_state(mdev, D_FAILED))
3253 return; 3233 return;
3254 3234
3255 trace_drbd_md_io(mdev, WRITE, mdev->ldev);
3256
3257 mutex_lock(&mdev->md_io_mutex); 3235 mutex_lock(&mdev->md_io_mutex);
3258 buffer = (struct meta_data_on_disk *)page_address(mdev->md_io_page); 3236 buffer = (struct meta_data_on_disk *)page_address(mdev->md_io_page);
3259 memset(buffer, 0, 512); 3237 memset(buffer, 0, 512);
@@ -3308,8 +3286,6 @@ int drbd_md_read(struct drbd_conf *mdev, struct drbd_backing_dev *bdev)
3308 if (!get_ldev_if_state(mdev, D_ATTACHING)) 3286 if (!get_ldev_if_state(mdev, D_ATTACHING))
3309 return ERR_IO_MD_DISK; 3287 return ERR_IO_MD_DISK;
3310 3288
3311 trace_drbd_md_io(mdev, READ, bdev);
3312
3313 mutex_lock(&mdev->md_io_mutex); 3289 mutex_lock(&mdev->md_io_mutex);
3314 buffer = (struct meta_data_on_disk *)page_address(mdev->md_io_page); 3290 buffer = (struct meta_data_on_disk *)page_address(mdev->md_io_page);
3315 3291
@@ -3388,11 +3364,8 @@ static void drbd_uuid_move_history(struct drbd_conf *mdev) __must_hold(local)
3388{ 3364{
3389 int i; 3365 int i;
3390 3366
3391 for (i = UI_HISTORY_START; i < UI_HISTORY_END; i++) { 3367 for (i = UI_HISTORY_START; i < UI_HISTORY_END; i++)
3392 mdev->ldev->md.uuid[i+1] = mdev->ldev->md.uuid[i]; 3368 mdev->ldev->md.uuid[i+1] = mdev->ldev->md.uuid[i];
3393
3394 trace_drbd_uuid(mdev, i+1);
3395 }
3396} 3369}
3397 3370
3398void _drbd_uuid_set(struct drbd_conf *mdev, int idx, u64 val) __must_hold(local) 3371void _drbd_uuid_set(struct drbd_conf *mdev, int idx, u64 val) __must_hold(local)
@@ -3407,7 +3380,6 @@ void _drbd_uuid_set(struct drbd_conf *mdev, int idx, u64 val) __must_hold(local)
3407 } 3380 }
3408 3381
3409 mdev->ldev->md.uuid[idx] = val; 3382 mdev->ldev->md.uuid[idx] = val;
3410 trace_drbd_uuid(mdev, idx);
3411 drbd_md_mark_dirty(mdev); 3383 drbd_md_mark_dirty(mdev);
3412} 3384}
3413 3385
@@ -3417,7 +3389,6 @@ void drbd_uuid_set(struct drbd_conf *mdev, int idx, u64 val) __must_hold(local)
3417 if (mdev->ldev->md.uuid[idx]) { 3389 if (mdev->ldev->md.uuid[idx]) {
3418 drbd_uuid_move_history(mdev); 3390 drbd_uuid_move_history(mdev);
3419 mdev->ldev->md.uuid[UI_HISTORY_START] = mdev->ldev->md.uuid[idx]; 3391 mdev->ldev->md.uuid[UI_HISTORY_START] = mdev->ldev->md.uuid[idx];
3420 trace_drbd_uuid(mdev, UI_HISTORY_START);
3421 } 3392 }
3422 _drbd_uuid_set(mdev, idx, val); 3393 _drbd_uuid_set(mdev, idx, val);
3423} 3394}
@@ -3436,7 +3407,6 @@ void drbd_uuid_new_current(struct drbd_conf *mdev) __must_hold(local)
3436 dev_info(DEV, "Creating new current UUID\n"); 3407 dev_info(DEV, "Creating new current UUID\n");
3437 D_ASSERT(mdev->ldev->md.uuid[UI_BITMAP] == 0); 3408 D_ASSERT(mdev->ldev->md.uuid[UI_BITMAP] == 0);
3438 mdev->ldev->md.uuid[UI_BITMAP] = mdev->ldev->md.uuid[UI_CURRENT]; 3409 mdev->ldev->md.uuid[UI_BITMAP] = mdev->ldev->md.uuid[UI_CURRENT];
3439 trace_drbd_uuid(mdev, UI_BITMAP);
3440 3410
3441 get_random_bytes(&val, sizeof(u64)); 3411 get_random_bytes(&val, sizeof(u64));
3442 _drbd_uuid_set(mdev, UI_CURRENT, val); 3412 _drbd_uuid_set(mdev, UI_CURRENT, val);
@@ -3451,8 +3421,6 @@ void drbd_uuid_set_bm(struct drbd_conf *mdev, u64 val) __must_hold(local)
3451 drbd_uuid_move_history(mdev); 3421 drbd_uuid_move_history(mdev);
3452 mdev->ldev->md.uuid[UI_HISTORY_START] = mdev->ldev->md.uuid[UI_BITMAP]; 3422 mdev->ldev->md.uuid[UI_HISTORY_START] = mdev->ldev->md.uuid[UI_BITMAP];
3453 mdev->ldev->md.uuid[UI_BITMAP] = 0; 3423 mdev->ldev->md.uuid[UI_BITMAP] = 0;
3454 trace_drbd_uuid(mdev, UI_HISTORY_START);
3455 trace_drbd_uuid(mdev, UI_BITMAP);
3456 } else { 3424 } else {
3457 if (mdev->ldev->md.uuid[UI_BITMAP]) 3425 if (mdev->ldev->md.uuid[UI_BITMAP])
3458 dev_warn(DEV, "bm UUID already set"); 3426 dev_warn(DEV, "bm UUID already set");
@@ -3460,7 +3428,6 @@ void drbd_uuid_set_bm(struct drbd_conf *mdev, u64 val) __must_hold(local)
3460 mdev->ldev->md.uuid[UI_BITMAP] = val; 3428 mdev->ldev->md.uuid[UI_BITMAP] = val;
3461 mdev->ldev->md.uuid[UI_BITMAP] &= ~((u64)1); 3429 mdev->ldev->md.uuid[UI_BITMAP] &= ~((u64)1);
3462 3430
3463 trace_drbd_uuid(mdev, UI_BITMAP);
3464 } 3431 }
3465 drbd_md_mark_dirty(mdev); 3432 drbd_md_mark_dirty(mdev);
3466} 3433}
@@ -3727,7 +3694,6 @@ const char *drbd_buildtag(void)
3727module_init(drbd_init) 3694module_init(drbd_init)
3728module_exit(drbd_cleanup) 3695module_exit(drbd_cleanup)
3729 3696
3730/* For drbd_tracing: */
3731EXPORT_SYMBOL(drbd_conn_str); 3697EXPORT_SYMBOL(drbd_conn_str);
3732EXPORT_SYMBOL(drbd_role_str); 3698EXPORT_SYMBOL(drbd_role_str);
3733EXPORT_SYMBOL(drbd_disk_str); 3699EXPORT_SYMBOL(drbd_disk_str);