diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2014-04-28 20:43:22 +0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-04-30 23:46:54 +0400 |
commit | 9e276872fe1665ea158f0c6f40df13008fed2908 (patch) | |
tree | 606f85fe946ba1fdc759da76c0acca9afc62df3b /drivers/block/drbd/drbd_main.c | |
parent | a910b12352f5ddee712c3423c31fbb8b312dde88 (diff) | |
download | linux-9e276872fe1665ea158f0c6f40df13008fed2908.tar.xz |
drbd: allow parallel promote/demote actions
We plan to use genl_family->parallel_ops = true in the future,
but need to review all possible interactions first.
For now, only selectively drop genl_lock() in drbd_set_role(),
instead serializing on our own internal resource->conf_update mutex.
We now can be promoted/demoted on many resources in parallel,
which may significantly improve cluster failover times
when fencing is required.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 865fdb3b0ce0..05db597401e6 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -2570,6 +2570,7 @@ struct drbd_resource *drbd_create_resource(const char *name) INIT_LIST_HEAD(&resource->connections); list_add_tail_rcu(&resource->resources, &drbd_resources); mutex_init(&resource->conf_update); + mutex_init(&resource->adm_mutex); spin_lock_init(&resource->req_lock); return resource; |