aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_int.h
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2010-12-07 18:39:32 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-03-10 05:36:19 -0500
commitbf885f8a6772fb48409dd505a09d974a5e621f22 (patch)
tree28205a11a192a14192bac3f8487b444e6d533955 /drivers/block/drbd/drbd_int.h
parentc8b325632f0e5ffdaeca3d1f3be77c9399316a40 (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.h32
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
1176extern void drbd_init_set_defaults(struct drbd_conf *mdev); 1176extern void drbd_init_set_defaults(struct drbd_conf *mdev);
1177extern int drbd_change_state(struct drbd_conf *mdev, enum chg_state_flags f, 1177extern 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);
1179extern void drbd_force_state(struct drbd_conf *, union drbd_state, 1181extern void drbd_force_state(struct drbd_conf *, union drbd_state,
1180 union drbd_state); 1182 union drbd_state);
1181extern int _drbd_request_state(struct drbd_conf *, union drbd_state, 1183extern enum drbd_state_rv _drbd_request_state(struct drbd_conf *,
1182 union drbd_state, enum chg_state_flags); 1184 union drbd_state,
1183extern 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);
1187extern enum drbd_state_rv __drbd_set_state(struct drbd_conf *, union drbd_state,
1188 enum chg_state_flags,
1189 struct completion *done);
1185extern void print_st_err(struct drbd_conf *, union drbd_state, 1190extern void print_st_err(struct drbd_conf *, union drbd_state,
1186 union drbd_state, int); 1191 union drbd_state, int);
1187extern int drbd_thread_start(struct drbd_thread *thi); 1192extern 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
1246extern int drbd_send_bitmap(struct drbd_conf *mdev); 1251extern int drbd_send_bitmap(struct drbd_conf *mdev);
1247extern int _drbd_send_bitmap(struct drbd_conf *mdev); 1252extern int _drbd_send_bitmap(struct drbd_conf *mdev);
1248extern int drbd_send_sr_reply(struct drbd_conf *mdev, int retcode); 1253extern int drbd_send_sr_reply(struct drbd_conf *mdev, enum drbd_state_rv retcode);
1249extern void drbd_free_bc(struct drbd_backing_dev *ldev); 1254extern void drbd_free_bc(struct drbd_backing_dev *ldev);
1250extern void drbd_mdev_cleanup(struct drbd_conf *mdev); 1255extern 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 =
1493extern enum determine_dev_size drbd_determin_dev_size(struct drbd_conf *, enum dds_flags) __must_hold(local); 1498extern enum determine_dev_size drbd_determin_dev_size(struct drbd_conf *, enum dds_flags) __must_hold(local);
1494extern void resync_after_online_grow(struct drbd_conf *); 1499extern void resync_after_online_grow(struct drbd_conf *);
1495extern void drbd_setup_queue_param(struct drbd_conf *mdev, unsigned int) __must_hold(local); 1500extern void drbd_setup_queue_param(struct drbd_conf *mdev, unsigned int) __must_hold(local);
1496extern int drbd_set_role(struct drbd_conf *mdev, enum drbd_role new_role, 1501extern enum drbd_state_rv drbd_set_role(struct drbd_conf *mdev,
1497 int force); 1502 enum drbd_role new_role,
1503 int force);
1498extern enum drbd_disk_state drbd_try_outdate_peer(struct drbd_conf *mdev); 1504extern enum drbd_disk_state drbd_try_outdate_peer(struct drbd_conf *mdev);
1499extern void drbd_try_outdate_peer_async(struct drbd_conf *mdev); 1505extern void drbd_try_outdate_peer_async(struct drbd_conf *mdev);
1500extern int drbd_khelper(struct drbd_conf *mdev, char *cmd); 1506extern 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
1764static inline int _drbd_set_state(struct drbd_conf *mdev, 1770static 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);