diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2010-12-07 18:39:32 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-10 05:36:19 -0500 |
commit | bf885f8a6772fb48409dd505a09d974a5e621f22 (patch) | |
tree | 28205a11a192a14192bac3f8487b444e6d533955 /drivers/block/drbd/drbd_int.h | |
parent | c8b325632f0e5ffdaeca3d1f3be77c9399316a40 (diff) |
drbd: Be more explicit about functions that return an enum drbd_state_rv
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 | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index c81710a42111..749607a494e6 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -1174,14 +1174,19 @@ enum dds_flags { | |||
1174 | }; | 1174 | }; |
1175 | 1175 | ||
1176 | extern void drbd_init_set_defaults(struct drbd_conf *mdev); | 1176 | extern void drbd_init_set_defaults(struct drbd_conf *mdev); |
1177 | extern int drbd_change_state(struct drbd_conf *mdev, enum chg_state_flags f, | 1177 | extern enum drbd_state_rv drbd_change_state(struct drbd_conf *mdev, |
1178 | union drbd_state mask, union drbd_state val); | 1178 | enum chg_state_flags f, |
1179 | union drbd_state mask, | ||
1180 | union drbd_state val); | ||
1179 | extern void drbd_force_state(struct drbd_conf *, union drbd_state, | 1181 | extern void drbd_force_state(struct drbd_conf *, union drbd_state, |
1180 | union drbd_state); | 1182 | union drbd_state); |
1181 | extern int _drbd_request_state(struct drbd_conf *, union drbd_state, | 1183 | extern enum drbd_state_rv _drbd_request_state(struct drbd_conf *, |
1182 | union drbd_state, enum chg_state_flags); | 1184 | union drbd_state, |
1183 | extern int __drbd_set_state(struct drbd_conf *, union drbd_state, | 1185 | union drbd_state, |
1184 | enum chg_state_flags, struct completion *done); | 1186 | enum chg_state_flags); |
1187 | extern enum drbd_state_rv __drbd_set_state(struct drbd_conf *, union drbd_state, | ||
1188 | enum chg_state_flags, | ||
1189 | struct completion *done); | ||
1185 | extern void print_st_err(struct drbd_conf *, union drbd_state, | 1190 | extern void print_st_err(struct drbd_conf *, union drbd_state, |
1186 | union drbd_state, int); | 1191 | union drbd_state, int); |
1187 | extern int drbd_thread_start(struct drbd_thread *thi); | 1192 | extern int drbd_thread_start(struct drbd_thread *thi); |
@@ -1245,7 +1250,7 @@ extern int drbd_send_ov_request(struct drbd_conf *mdev,sector_t sector,int size) | |||
1245 | 1250 | ||
1246 | extern int drbd_send_bitmap(struct drbd_conf *mdev); | 1251 | extern int drbd_send_bitmap(struct drbd_conf *mdev); |
1247 | extern int _drbd_send_bitmap(struct drbd_conf *mdev); | 1252 | extern int _drbd_send_bitmap(struct drbd_conf *mdev); |
1248 | extern int drbd_send_sr_reply(struct drbd_conf *mdev, int retcode); | 1253 | extern int drbd_send_sr_reply(struct drbd_conf *mdev, enum drbd_state_rv retcode); |
1249 | extern void drbd_free_bc(struct drbd_backing_dev *ldev); | 1254 | extern void drbd_free_bc(struct drbd_backing_dev *ldev); |
1250 | extern void drbd_mdev_cleanup(struct drbd_conf *mdev); | 1255 | extern void drbd_mdev_cleanup(struct drbd_conf *mdev); |
1251 | 1256 | ||
@@ -1493,8 +1498,9 @@ enum determine_dev_size { dev_size_error = -1, unchanged = 0, shrunk = 1, grew = | |||
1493 | extern enum determine_dev_size drbd_determin_dev_size(struct drbd_conf *, enum dds_flags) __must_hold(local); | 1498 | extern enum determine_dev_size drbd_determin_dev_size(struct drbd_conf *, enum dds_flags) __must_hold(local); |
1494 | extern void resync_after_online_grow(struct drbd_conf *); | 1499 | extern void resync_after_online_grow(struct drbd_conf *); |
1495 | extern void drbd_setup_queue_param(struct drbd_conf *mdev, unsigned int) __must_hold(local); | 1500 | extern void drbd_setup_queue_param(struct drbd_conf *mdev, unsigned int) __must_hold(local); |
1496 | extern int drbd_set_role(struct drbd_conf *mdev, enum drbd_role new_role, | 1501 | extern enum drbd_state_rv drbd_set_role(struct drbd_conf *mdev, |
1497 | int force); | 1502 | enum drbd_role new_role, |
1503 | int force); | ||
1498 | extern enum drbd_disk_state drbd_try_outdate_peer(struct drbd_conf *mdev); | 1504 | extern enum drbd_disk_state drbd_try_outdate_peer(struct drbd_conf *mdev); |
1499 | extern void drbd_try_outdate_peer_async(struct drbd_conf *mdev); | 1505 | extern void drbd_try_outdate_peer_async(struct drbd_conf *mdev); |
1500 | extern int drbd_khelper(struct drbd_conf *mdev, char *cmd); | 1506 | extern int drbd_khelper(struct drbd_conf *mdev, char *cmd); |
@@ -1761,11 +1767,11 @@ static inline void drbd_state_unlock(struct drbd_conf *mdev) | |||
1761 | wake_up(&mdev->misc_wait); | 1767 | wake_up(&mdev->misc_wait); |
1762 | } | 1768 | } |
1763 | 1769 | ||
1764 | static inline int _drbd_set_state(struct drbd_conf *mdev, | 1770 | static inline enum drbd_state_rv |
1765 | union drbd_state ns, enum chg_state_flags flags, | 1771 | _drbd_set_state(struct drbd_conf *mdev, union drbd_state ns, |
1766 | struct completion *done) | 1772 | enum chg_state_flags flags, struct completion *done) |
1767 | { | 1773 | { |
1768 | int rv; | 1774 | enum drbd_state_rv rv; |
1769 | 1775 | ||
1770 | read_lock(&global_state_lock); | 1776 | read_lock(&global_state_lock); |
1771 | rv = __drbd_set_state(mdev, ns, flags, done); | 1777 | rv = __drbd_set_state(mdev, ns, flags, done); |