From 50ae17450f272e942a6dd7a4dd1e2e8d58de22ec Mon Sep 17 00:00:00 2001
From: Philipp Reisner <philipp.reisner@linbit.com>
Date: Tue, 10 Jul 2018 15:07:40 +0200
Subject: [PATCH] drbd: rename resource->susp to resource->susp_user

---
 drbd/drbd_int.h   |  2 +-
 drbd/drbd_nl.c    |  2 +-
 drbd/drbd_state.c | 16 ++++++++--------
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drbd/drbd_int.h b/drbd/drbd_int.h
index 2bbfc2d3..0b735542 100644
--- a/drbd/drbd_int.h
+++ b/drbd/drbd_int.h
@@ -877,7 +877,7 @@ struct drbd_resource {
 	struct queued_twopc *starting_queued_twopc;
 
 	enum drbd_role role[2];
-	bool susp[2];			/* IO suspended by user */
+	bool susp_user[2];			/* IO suspended by user */
 	bool susp_nod[2];		/* IO suspended because no data */
 
 	enum write_ordering_e write_ordering;
diff --git a/drbd/drbd_nl.c b/drbd/drbd_nl.c
index 29109d8a..15514763 100644
--- a/drbd/drbd_nl.c
+++ b/drbd/drbd_nl.c
@@ -5582,7 +5582,7 @@ static void resource_to_info(struct resource_info *info,
 			     struct drbd_resource *resource)
 {
 	info->res_role = resource->role[NOW];
-	info->res_susp = resource->susp[NOW];
+	info->res_susp = resource->susp_user[NOW];
 	info->res_susp_nod = resource->susp_nod[NOW];
 	info->res_susp_fen = is_suspended_fen(resource, NOW);
 	info->res_susp_quorum = is_suspended_quorum(resource, NOW);
diff --git a/drbd/drbd_state.c b/drbd/drbd_state.c
index 294cf1b9..ffee2fd5 100644
--- a/drbd/drbd_state.c
+++ b/drbd/drbd_state.c
@@ -253,7 +253,7 @@ bool is_suspended_quorum(struct drbd_resource *resource, enum which_state which)
 
 bool resource_is_suspended(struct drbd_resource *resource, enum which_state which)
 {
-	bool rv = resource->susp[which] || resource->susp_nod[which];
+	bool rv = resource->susp_user[which] || resource->susp_nod[which];
 
 	if (rv)
 		return rv;
@@ -331,7 +331,7 @@ struct drbd_state_change *remember_state_change(struct drbd_resource *resource,
 	memcpy(state_change->resource->role,
 	       resource->role, sizeof(resource->role));
 	memcpy(state_change->resource->susp,
-	       resource->susp, sizeof(resource->susp));
+	       resource->susp_user, sizeof(resource->susp_user));
 	memcpy(state_change->resource->susp_nod,
 	       resource->susp_nod, sizeof(resource->susp_nod));
 
@@ -481,7 +481,7 @@ static bool state_has_changed(struct drbd_resource *resource)
 		return true;
 
 	if (resource->role[OLD] != resource->role[NEW] ||
-	    resource->susp[OLD] != resource->susp[NEW] ||
+	    resource->susp_user[OLD] != resource->susp_user[NEW] ||
 	    resource->susp_nod[OLD] != resource->susp_nod[NEW])
 		return true;
 
@@ -524,7 +524,7 @@ static void ___begin_state_change(struct drbd_resource *resource)
 	int vnr;
 
 	resource->role[NEW] = resource->role[NOW];
-	resource->susp[NEW] = resource->susp[NOW];
+	resource->susp_user[NEW] = resource->susp_user[NOW];
 	resource->susp_nod[NEW] = resource->susp_nod[NOW];
 
 	for_each_connection(connection, resource) {
@@ -646,7 +646,7 @@ static enum drbd_state_rv ___end_state_change(struct drbd_resource *resource, st
 	 * depending on that change happens. */
 	smp_wmb();
 	resource->role[NOW] = resource->role[NEW];
-	resource->susp[NOW] = resource->susp[NEW];
+	resource->susp_user[NOW] = resource->susp_user[NEW];
 	resource->susp_nod[NOW] = resource->susp_nod[NEW];
 
 	for_each_connection(connection, resource) {
@@ -843,7 +843,7 @@ static union drbd_state drbd_get_resource_state(struct drbd_resource *resource,
 		.disk = D_UNKNOWN,  /* really: undefined */
 		.role = resource->role[which],
 		.peer = R_UNKNOWN,  /* really: undefined */
-		.susp = resource->susp[which] || is_suspended_quorum(resource, which),
+		.susp = resource->susp_user[which] || is_suspended_quorum(resource, which),
 		.susp_nod = resource->susp_nod[which],
 		.susp_fen = is_suspended_fen(resource, which),
 		.pdsk = D_UNKNOWN,  /* really: undefined */
@@ -1042,7 +1042,7 @@ static int scnprintf_io_suspend_flags(char *buffer, size_t size,
 	if (!resource_is_suspended(resource, which))
 		return scnprintf(buffer, size, "no");
 
-	if (resource->susp[which])
+	if (resource->susp_user[which])
 		b += scnprintf(b, end - b, "user,");
 	if (resource->susp_nod[which])
 		b += scnprintf(b, end - b, "no-disk,");
@@ -4448,7 +4448,7 @@ enum drbd_state_rv change_role(struct drbd_resource *resource,
 
 void __change_io_susp_user(struct drbd_resource *resource, bool value)
 {
-	resource->susp[NEW] = value;
+	resource->susp_user[NEW] = value;
 }
 
 enum drbd_state_rv change_io_susp_user(struct drbd_resource *resource,
-- 
2.34.1

