diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2012-07-26 08:09:49 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-09 08:05:32 -0500 |
commit | 58ffa580a748dd16b1e5ab260bea39cdbd1e94ef (patch) | |
tree | 4155bcde6d49f50545bcb1312b6470c64e823d72 /drivers/block/drbd/drbd_int.h | |
parent | 970fbde1f1ebae0c85bbaed3de83684a58d60fad (diff) |
drbd: introduce stop-sector to online verify
We now can schedule only a specific range of sectors for online verify,
or interrupt a running verify without interrupting the connection.
Had to bump the protocol version differently, we are now 101.
Added verify_can_do_stop_sector() { protocol >= 97 && protocol != 100; }
Also, the return value convention for worker callbacks has changed,
we returned "true/false" for "keep the connection up" in 8.3,
we return 0 for success and <= for failure in 8.4.
Affected: receive_state()
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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 22adfc7189de..eddc4388a1b1 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -971,6 +971,7 @@ struct drbd_conf { | |||
971 | 971 | ||
972 | /* where does the admin want us to start? (sector) */ | 972 | /* where does the admin want us to start? (sector) */ |
973 | sector_t ov_start_sector; | 973 | sector_t ov_start_sector; |
974 | sector_t ov_stop_sector; | ||
974 | /* where are we now? (sector) */ | 975 | /* where are we now? (sector) */ |
975 | sector_t ov_position; | 976 | sector_t ov_position; |
976 | /* Start sector of out of sync range (to merge printk reporting). */ | 977 | /* Start sector of out of sync range (to merge printk reporting). */ |
@@ -2264,6 +2265,12 @@ static inline void dec_ap_bio(struct drbd_conf *mdev) | |||
2264 | wake_up(&mdev->misc_wait); | 2265 | wake_up(&mdev->misc_wait); |
2265 | } | 2266 | } |
2266 | 2267 | ||
2268 | static inline bool verify_can_do_stop_sector(struct drbd_conf *mdev) | ||
2269 | { | ||
2270 | return mdev->tconn->agreed_pro_version >= 97 && | ||
2271 | mdev->tconn->agreed_pro_version != 100; | ||
2272 | } | ||
2273 | |||
2267 | static inline int drbd_set_ed_uuid(struct drbd_conf *mdev, u64 val) | 2274 | static inline int drbd_set_ed_uuid(struct drbd_conf *mdev, u64 val) |
2268 | { | 2275 | { |
2269 | int changed = mdev->ed_uuid != val; | 2276 | int changed = mdev->ed_uuid != val; |