diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2011-05-31 12:33:49 (GMT) |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2014-02-17 15:44:51 (GMT) |
commit | a6b32bc3cebd3fb6848c526763733b9dbc389c02 (patch) | |
tree | 91435ad006bf2eaada891ae26e01bb51fcc790d9 /drivers/block/drbd/drbd_req.h | |
parent | bde89a9e151b482765ed40e04307a6190236b387 (diff) | |
download | linux-a6b32bc3cebd3fb6848c526763733b9dbc389c02.tar.xz |
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_req.h')
-rw-r--r-- | drivers/block/drbd/drbd_req.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_req.h b/drivers/block/drbd/drbd_req.h index 407404b..27283e6 100644 --- a/drivers/block/drbd/drbd_req.h +++ b/drivers/block/drbd/drbd_req.h @@ -318,9 +318,9 @@ static inline int req_mod(struct drbd_request *req, struct bio_and_error m; int rv; - spin_lock_irqsave(&device->connection->req_lock, flags); + spin_lock_irqsave(&first_peer_device(device)->connection->req_lock, flags); rv = __req_mod(req, what, &m); - spin_unlock_irqrestore(&device->connection->req_lock, flags); + spin_unlock_irqrestore(&first_peer_device(device)->connection->req_lock, flags); if (m.bio) complete_master_bio(device, &m); |