diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2011-05-31 14:33:49 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2014-02-17 16:44:51 +0100 |
commit | a6b32bc3cebd3fb6848c526763733b9dbc389c02 (patch) | |
tree | 91435ad006bf2eaada891ae26e01bb51fcc790d9 /drivers/block/drbd/drbd_proc.c | |
parent | bde89a9e151b482765ed40e04307a6190236b387 (diff) | |
download | talos-obmc-linux-a6b32bc3cebd3fb6848c526763733b9dbc389c02.tar.gz talos-obmc-linux-a6b32bc3cebd3fb6848c526763733b9dbc389c02.zip |
drbd: Introduce "peer_device" object between "device" and "connection"
In a setup where a device (aka volume) can replicate to multiple peers and one
connection can be shared between multiple devices, we need separate objects to
represent devices on peer nodes and network connections.
As a first step to introduce multiple connections per device, give each
drbd_device object a single drbd_peer_device object which connects it to a
drbd_connection object.
Signed-off-by: Andreas Gruenbacher <agruen@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_proc.c')
-rw-r--r-- | drivers/block/drbd/drbd_proc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_proc.c b/drivers/block/drbd/drbd_proc.c index 9c4d413655e3..f1c81c101fad 100644 --- a/drivers/block/drbd/drbd_proc.c +++ b/drivers/block/drbd/drbd_proc.c @@ -251,7 +251,7 @@ static int drbd_seq_show(struct seq_file *seq, void *v) /* reset device->congestion_reason */ bdi_rw_congested(&device->rq_queue->backing_dev_info); - nc = rcu_dereference(device->connection->net_conf); + nc = rcu_dereference(first_peer_device(device)->connection->net_conf); wp = nc ? nc->wire_protocol - DRBD_PROT_A + 'A' : ' '; seq_printf(seq, "%2d: cs:%s ro:%s/%s ds:%s/%s %c %c%c%c%c%c%c\n" @@ -280,8 +280,8 @@ static int drbd_seq_show(struct seq_file *seq, void *v) atomic_read(&device->rs_pending_cnt), atomic_read(&device->unacked_cnt), atomic_read(&device->ap_bio_cnt), - device->connection->epochs, - write_ordering_chars[device->connection->write_ordering] + first_peer_device(device)->connection->epochs, + write_ordering_chars[first_peer_device(device)->connection->write_ordering] ); seq_printf(seq, " oos:%llu\n", Bit2KB((unsigned long long) |