diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-05-04 10:31:03 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-05-17 19:26:27 -0400 |
commit | eedf386ae9d9e80a5669107e960090951e62f3a3 (patch) | |
tree | 1f1d6739b6b6009c12f7a68dfe1d347fdba85868 /drivers/block/drbd | |
parent | cdd67a74603d0453ddffc24c572aed2ddd1795b8 (diff) |
drbd: Proc bits of new resync speed stuff
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r-- | drivers/block/drbd/drbd_proc.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_proc.c b/drivers/block/drbd/drbd_proc.c index be3374b68460..81dea0a85933 100644 --- a/drivers/block/drbd/drbd_proc.c +++ b/drivers/block/drbd/drbd_proc.c | |||
@@ -73,14 +73,22 @@ static void drbd_syncer_progress(struct drbd_conf *mdev, struct seq_file *seq) | |||
73 | seq_printf(seq, "sync'ed:%3u.%u%% ", res / 10, res % 10); | 73 | seq_printf(seq, "sync'ed:%3u.%u%% ", res / 10, res % 10); |
74 | /* if more than 1 GB display in MB */ | 74 | /* if more than 1 GB display in MB */ |
75 | if (mdev->rs_total > 0x100000L) | 75 | if (mdev->rs_total > 0x100000L) |
76 | seq_printf(seq, "(%lu/%lu)M\n\t", | 76 | seq_printf(seq, "(%lu/%lu)M", |
77 | (unsigned long) Bit2KB(rs_left >> 10), | 77 | (unsigned long) Bit2KB(rs_left >> 10), |
78 | (unsigned long) Bit2KB(mdev->rs_total >> 10)); | 78 | (unsigned long) Bit2KB(mdev->rs_total >> 10)); |
79 | else | 79 | else |
80 | seq_printf(seq, "(%lu/%lu)K\n\t", | 80 | seq_printf(seq, "(%lu/%lu)K", |
81 | (unsigned long) Bit2KB(rs_left), | 81 | (unsigned long) Bit2KB(rs_left), |
82 | (unsigned long) Bit2KB(mdev->rs_total)); | 82 | (unsigned long) Bit2KB(mdev->rs_total)); |
83 | 83 | ||
84 | if (mdev->state.conn == C_SYNC_TARGET) | ||
85 | seq_printf(seq, " queue_delay: %d.%d ms\n\t", | ||
86 | mdev->data_delay / 1000, | ||
87 | (mdev->data_delay % 1000) / 100); | ||
88 | else if (mdev->state.conn == C_SYNC_SOURCE) | ||
89 | seq_printf(seq, " delay_probe: %d\n\t", | ||
90 | atomic_read(&mdev->delay_seq)); | ||
91 | |||
84 | /* see drivers/md/md.c | 92 | /* see drivers/md/md.c |
85 | * We do not want to overflow, so the order of operands and | 93 | * We do not want to overflow, so the order of operands and |
86 | * the * 100 / 100 trick are important. We do a +1 to be | 94 | * the * 100 / 100 trick are important. We do a +1 to be |
@@ -128,6 +136,14 @@ static void drbd_syncer_progress(struct drbd_conf *mdev, struct seq_file *seq) | |||
128 | else | 136 | else |
129 | seq_printf(seq, " (%ld)", dbdt); | 137 | seq_printf(seq, " (%ld)", dbdt); |
130 | 138 | ||
139 | if (mdev->state.conn == C_SYNC_TARGET) { | ||
140 | if (mdev->c_sync_rate > 1000) | ||
141 | seq_printf(seq, " want: %d,%03d", | ||
142 | mdev->c_sync_rate / 1000, mdev->c_sync_rate % 1000); | ||
143 | else | ||
144 | seq_printf(seq, " want: %d", mdev->c_sync_rate); | ||
145 | } | ||
146 | |||
131 | seq_printf(seq, " K/sec\n"); | 147 | seq_printf(seq, " K/sec\n"); |
132 | } | 148 | } |
133 | 149 | ||