diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2011-06-21 17:23:59 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2014-02-17 16:45:00 +0100 |
commit | c06ece6ba6f1bb2e01616e111303c3ae5f80fdbe (patch) | |
tree | 2044b6aecd791466750863dbda4a544bce31bd19 /drivers/block/drbd/drbd_int.h | |
parent | eb6bea673f884c037fd5358b5f17bfca18038708 (diff) | |
download | linux-c06ece6ba6f1bb2e01616e111303c3ae5f80fdbe.tar.gz linux-c06ece6ba6f1bb2e01616e111303c3ae5f80fdbe.tar.bz2 linux-c06ece6ba6f1bb2e01616e111303c3ae5f80fdbe.zip |
drbd: Turn connection->volumes into connection->peer_devices
Let connection->peer_devices point to peer devices; connection->volumes was
pointing to devices.
Signed-off-by: Andreas Gruenbacher <agruen@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_int.h')
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index c88336c64b6b..41dced195653 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -549,7 +549,7 @@ struct drbd_connection { struct list_head connections; struct drbd_resource *resource; struct kref kref; - struct idr volumes; /* <connection, vnr> to device mapping */ + struct idr peer_devices; /* volume number to peer device mapping */ enum drbd_conns cstate; /* Only C_STANDALONE to C_WF_REPORT_PARAMS */ unsigned susp:1; /* IO suspended by user */ unsigned susp_nod:1; /* IO suspended because no data */ @@ -822,7 +822,10 @@ static inline unsigned int device_to_minor(struct drbd_device *device) static inline struct drbd_device *vnr_to_device(struct drbd_connection *connection, int vnr) { - return (struct drbd_device *)idr_find(&connection->volumes, vnr); + struct drbd_peer_device *peer_device; + + peer_device = idr_find(&connection->peer_devices, vnr); + return peer_device ? peer_device->device : NULL; } /* |