--- zzzz-none-000/linux-3.10.107/drivers/block/drbd/drbd_state.h 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/block/drbd/drbd_state.h 2021-02-04 17:41:59.000000000 +0000 @@ -1,8 +1,8 @@ #ifndef DRBD_STATE_H #define DRBD_STATE_H -struct drbd_conf; -struct drbd_tconn; +struct drbd_device; +struct drbd_connection; /** * DOC: DRBD State macros @@ -107,36 +107,41 @@ unsigned int i; }; -extern enum drbd_state_rv drbd_change_state(struct drbd_conf *mdev, +extern enum drbd_state_rv drbd_change_state(struct drbd_device *device, enum chg_state_flags f, union drbd_state mask, union drbd_state val); -extern void drbd_force_state(struct drbd_conf *, union drbd_state, +extern void drbd_force_state(struct drbd_device *, union drbd_state, union drbd_state); -extern enum drbd_state_rv _drbd_request_state(struct drbd_conf *, +extern enum drbd_state_rv _drbd_request_state(struct drbd_device *, union drbd_state, union drbd_state, enum chg_state_flags); -extern enum drbd_state_rv __drbd_set_state(struct drbd_conf *, union drbd_state, + +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 void print_st_err(struct drbd_conf *, union drbd_state, +extern void print_st_err(struct drbd_device *, union drbd_state, union drbd_state, int); enum drbd_state_rv -_conn_request_state(struct drbd_tconn *tconn, union drbd_state mask, union drbd_state val, +_conn_request_state(struct drbd_connection *connection, union drbd_state mask, union drbd_state val, enum chg_state_flags flags); enum drbd_state_rv -conn_request_state(struct drbd_tconn *tconn, union drbd_state mask, union drbd_state val, +conn_request_state(struct drbd_connection *connection, union drbd_state mask, union drbd_state val, enum chg_state_flags flags); -extern void drbd_resume_al(struct drbd_conf *mdev); -extern bool conn_all_vols_unconf(struct drbd_tconn *tconn); +extern void drbd_resume_al(struct drbd_device *device); +extern bool conn_all_vols_unconf(struct drbd_connection *connection); /** * drbd_request_state() - Reqest a state change - * @mdev: DRBD device. + * @device: DRBD device. * @mask: mask of state bits to change. * @val: value of new state bits. * @@ -144,18 +149,18 @@ * quite verbose in case the state change is not possible, and all those * state changes are globally serialized. */ -static inline int drbd_request_state(struct drbd_conf *mdev, +static inline int drbd_request_state(struct drbd_device *device, union drbd_state mask, union drbd_state val) { - return _drbd_request_state(mdev, mask, val, CS_VERBOSE + CS_ORDERED); + return _drbd_request_state(device, mask, val, CS_VERBOSE + CS_ORDERED); } -enum drbd_role conn_highest_role(struct drbd_tconn *tconn); -enum drbd_role conn_highest_peer(struct drbd_tconn *tconn); -enum drbd_disk_state conn_highest_disk(struct drbd_tconn *tconn); -enum drbd_disk_state conn_lowest_disk(struct drbd_tconn *tconn); -enum drbd_disk_state conn_highest_pdsk(struct drbd_tconn *tconn); -enum drbd_conns conn_lowest_conn(struct drbd_tconn *tconn); +enum drbd_role conn_highest_role(struct drbd_connection *connection); +enum drbd_role conn_highest_peer(struct drbd_connection *connection); +enum drbd_disk_state conn_highest_disk(struct drbd_connection *connection); +enum drbd_disk_state conn_lowest_disk(struct drbd_connection *connection); +enum drbd_disk_state conn_highest_pdsk(struct drbd_connection *connection); +enum drbd_conns conn_lowest_conn(struct drbd_connection *connection); #endif