diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2011-02-08 05:09:18 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-09-28 04:33:02 -0400 |
commit | 062e879c8b473d2dba270f8244a211b0c4dafe28 (patch) | |
tree | d52341db0e77bee1f708912ff065eb7b3d8dbf08 /drivers/block/drbd/drbd_int.h | |
parent | dc8228d107475bdf5458383f0d1fca202d82a184 (diff) |
drbd: Use and idr data structure to map volume numbers to mdev pointers
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_int.h')
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index ddd2ed7dec1c..8d32f9dc18ed 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/major.h> | 40 | #include <linux/major.h> |
41 | #include <linux/blkdev.h> | 41 | #include <linux/blkdev.h> |
42 | #include <linux/genhd.h> | 42 | #include <linux/genhd.h> |
43 | #include <linux/idr.h> | ||
43 | #include <net/tcp.h> | 44 | #include <net/tcp.h> |
44 | #include <linux/lru_cache.h> | 45 | #include <linux/lru_cache.h> |
45 | #include <linux/prefetch.h> | 46 | #include <linux/prefetch.h> |
@@ -916,8 +917,9 @@ struct drbd_tconn { /* is a resource from the config file */ | |||
916 | char *name; /* Resource name */ | 917 | char *name; /* Resource name */ |
917 | struct list_head all_tconn; /* List of all drbd_tconn, prot by global_state_lock */ | 918 | struct list_head all_tconn; /* List of all drbd_tconn, prot by global_state_lock */ |
918 | struct drbd_conf *volume0; /* TODO: Remove me again */ | 919 | struct drbd_conf *volume0; /* TODO: Remove me again */ |
919 | unsigned long flags; | 920 | struct idr volumes; /* <tconn, vnr> to mdev mapping */ |
920 | 921 | ||
922 | unsigned long flags; | ||
921 | struct net_conf *net_conf; /* protected by get_net_conf() and put_net_conf() */ | 923 | struct net_conf *net_conf; /* protected by get_net_conf() and put_net_conf() */ |
922 | atomic_t net_cnt; /* Users of net_conf */ | 924 | atomic_t net_cnt; /* Users of net_conf */ |
923 | wait_queue_head_t net_cnt_wait; | 925 | wait_queue_head_t net_cnt_wait; |