summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_state.h
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2014-08-14 18:33:30 +0200
committerJens Axboe <axboe@fb.com>2015-11-25 09:22:00 -0700
commit28bc3b8c71cda033a4c013131c635d1148889824 (patch)
treeceb03e905cdee0d06cd169f8affe46f722fd14d8 /drivers/block/drbd/drbd_state.h
parent1ec317d3d1f9b9ec19926fdf2fc59fa3ec8cd15d (diff)
downloadblackbird-op-linux-28bc3b8c71cda033a4c013131c635d1148889824.tar.gz
blackbird-op-linux-28bc3b8c71cda033a4c013131c635d1148889824.zip
drbd: Fix locking across all resources
Instead of using a rwlock for synchronizing state changes across resources, take the request locks of all resources for global state changes. Use resources_mutex to serialize global state changes. This means that taking the request lock of a resource is now enough to prevent changes of that resource. (Previously, a read lock on the global state lock was needed as well.) 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_state.h')
-rw-r--r--drivers/block/drbd/drbd_state.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_state.h b/drivers/block/drbd/drbd_state.h
index 7f53c40823cd..bd989536f888 100644
--- a/drivers/block/drbd/drbd_state.h
+++ b/drivers/block/drbd/drbd_state.h
@@ -122,9 +122,9 @@ extern enum drbd_state_rv
_drbd_request_state_holding_state_mutex(struct drbd_device *, union drbd_state,
union drbd_state, enum chg_state_flags);
-extern enum drbd_state_rv __drbd_set_state(struct drbd_device *, union drbd_state,
- enum chg_state_flags,
- struct completion *done);
+extern enum drbd_state_rv _drbd_set_state(struct drbd_device *, union drbd_state,
+ enum chg_state_flags,
+ struct completion *done);
extern void print_st_err(struct drbd_device *, union drbd_state,
union drbd_state, int);
OpenPOWER on IntegriCloud