aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2010-09-06 06:13:20 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2010-10-14 12:38:36 -0400
commit02bc7174ae83617b4364dc179d95d848d9fd6db5 (patch)
treedf2e16cc3b4e3ac23cceffa710ee6b2daccac384 /drivers
parenta821cc4a9a8d9e67356f9a5cfc1206aa3cfd30f7 (diff)
drbd: cosmetic, don't report resync for online-verify
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/drbd/drbd_main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 981cfd178b09..2060db69f182 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -504,7 +504,7 @@ static int is_valid_state(struct drbd_conf *mdev, union drbd_state ns);
504static int is_valid_state_transition(struct drbd_conf *, 504static int is_valid_state_transition(struct drbd_conf *,
505 union drbd_state, union drbd_state); 505 union drbd_state, union drbd_state);
506static union drbd_state sanitize_state(struct drbd_conf *mdev, union drbd_state os, 506static union drbd_state sanitize_state(struct drbd_conf *mdev, union drbd_state os,
507 union drbd_state ns, int *warn_sync_abort); 507 union drbd_state ns, const char **warn_sync_abort);
508int drbd_send_state_req(struct drbd_conf *, 508int drbd_send_state_req(struct drbd_conf *,
509 union drbd_state, union drbd_state); 509 union drbd_state, union drbd_state);
510 510
@@ -812,7 +812,7 @@ static int is_valid_state_transition(struct drbd_conf *mdev,
812 * to D_UNKNOWN. This rule and many more along those lines are in this function. 812 * to D_UNKNOWN. This rule and many more along those lines are in this function.
813 */ 813 */
814static union drbd_state sanitize_state(struct drbd_conf *mdev, union drbd_state os, 814static union drbd_state sanitize_state(struct drbd_conf *mdev, union drbd_state os,
815 union drbd_state ns, int *warn_sync_abort) 815 union drbd_state ns, const char **warn_sync_abort)
816{ 816{
817 enum drbd_fencing_p fp; 817 enum drbd_fencing_p fp;
818 818
@@ -851,7 +851,9 @@ static union drbd_state sanitize_state(struct drbd_conf *mdev, union drbd_state
851 if (os.conn > C_CONNECTED && ns.conn > C_CONNECTED && 851 if (os.conn > C_CONNECTED && ns.conn > C_CONNECTED &&
852 (ns.disk <= D_FAILED || ns.pdsk <= D_FAILED)) { 852 (ns.disk <= D_FAILED || ns.pdsk <= D_FAILED)) {
853 if (warn_sync_abort) 853 if (warn_sync_abort)
854 *warn_sync_abort = 1; 854 *warn_sync_abort =
855 os.conn == C_VERIFY_S || os.conn == C_VERIFY_T ?
856 "Online-verify" : "Resync";
855 ns.conn = C_CONNECTED; 857 ns.conn = C_CONNECTED;
856 } 858 }
857 859
@@ -984,7 +986,7 @@ int __drbd_set_state(struct drbd_conf *mdev,
984{ 986{
985 union drbd_state os; 987 union drbd_state os;
986 int rv = SS_SUCCESS; 988 int rv = SS_SUCCESS;
987 int warn_sync_abort = 0; 989 const char *warn_sync_abort = NULL;
988 struct after_state_chg_work *ascw; 990 struct after_state_chg_work *ascw;
989 991
990 os = mdev->state; 992 os = mdev->state;
@@ -1016,7 +1018,7 @@ int __drbd_set_state(struct drbd_conf *mdev,
1016 } 1018 }
1017 1019
1018 if (warn_sync_abort) 1020 if (warn_sync_abort)
1019 dev_warn(DEV, "Resync aborted.\n"); 1021 dev_warn(DEV, "%s aborted.\n", warn_sync_abort);
1020 1022
1021 { 1023 {
1022 char *pbp, pb[300]; 1024 char *pbp, pb[300];