mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Reisner <philipp.reisner@linbit.com>
To: linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Subject: [PATCH 08/13] drbd: Rename DRBD_ADM_NEED_{CONN -> RESOURCE}
Date: Wed, 12 Oct 2011 14:27:30 +0200	[thread overview]
Message-ID: <1318422455-17539-9-git-send-email-philipp.reisner@linbit.com> (raw)
In-Reply-To: <1318422455-17539-1-git-send-email-philipp.reisner@linbit.com>

From: Andreas Gruenbacher <agruen@linbit.com>

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
---
 drivers/block/drbd/drbd_nl.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index 0c07baf..a834097 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -165,7 +165,7 @@ int drbd_msg_put_info(const char *info)
  * If it returns successfully, adm_ctx members are valid.
  */
 #define DRBD_ADM_NEED_MINOR	1
-#define DRBD_ADM_NEED_CONN	2
+#define DRBD_ADM_NEED_RESOURCE	2
 static int drbd_adm_prepare(struct sk_buff *skb, struct genl_info *info,
 		unsigned flags)
 {
@@ -230,18 +230,18 @@ static int drbd_adm_prepare(struct sk_buff *skb, struct genl_info *info,
 		drbd_msg_put_info("unknown minor");
 		return ERR_MINOR_INVALID;
 	}
-	if (!adm_ctx.tconn && (flags & DRBD_ADM_NEED_CONN)) {
-		drbd_msg_put_info("unknown connection");
+	if (!adm_ctx.tconn && (flags & DRBD_ADM_NEED_RESOURCE)) {
+		drbd_msg_put_info("unknown resource");
 		return ERR_INVALID_REQUEST;
 	}
 
 	/* some more paranoia, if the request was over-determined */
 	if (adm_ctx.mdev && adm_ctx.tconn &&
 	    adm_ctx.mdev->tconn != adm_ctx.tconn) {
-		pr_warning("request: minor=%u, conn=%s; but that minor belongs to connection %s\n",
+		pr_warning("request: minor=%u, resource=%s; but that minor belongs to connection %s\n",
 				adm_ctx.minor, adm_ctx.resource_name,
 				adm_ctx.mdev->tconn->name);
-		drbd_msg_put_info("minor exists in different connection");
+		drbd_msg_put_info("minor exists in different resource");
 		return ERR_INVALID_REQUEST;
 	}
 	if (adm_ctx.mdev &&
@@ -1909,7 +1909,7 @@ int drbd_adm_net_opts(struct sk_buff *skb, struct genl_info *info)
 	int rsr; /* re-sync running */
 	struct crypto crypto = { };
 
-	retcode = drbd_adm_prepare(skb, info, DRBD_ADM_NEED_CONN);
+	retcode = drbd_adm_prepare(skb, info, DRBD_ADM_NEED_RESOURCE);
 	if (!adm_ctx.reply_skb)
 		return retcode;
 	if (retcode != NO_ERROR)
@@ -2042,7 +2042,7 @@ int drbd_adm_connect(struct sk_buff *skb, struct genl_info *info)
 	int i;
 	int err;
 
-	retcode = drbd_adm_prepare(skb, info, DRBD_ADM_NEED_CONN);
+	retcode = drbd_adm_prepare(skb, info, DRBD_ADM_NEED_RESOURCE);
 	if (!adm_ctx.reply_skb)
 		return retcode;
 	if (retcode != NO_ERROR)
@@ -2219,7 +2219,7 @@ int drbd_adm_disconnect(struct sk_buff *skb, struct genl_info *info)
 	enum drbd_ret_code retcode;
 	int err;
 
-	retcode = drbd_adm_prepare(skb, info, DRBD_ADM_NEED_CONN);
+	retcode = drbd_adm_prepare(skb, info, DRBD_ADM_NEED_RESOURCE);
 	if (!adm_ctx.reply_skb)
 		return retcode;
 	if (retcode != NO_ERROR)
@@ -2371,7 +2371,7 @@ int drbd_adm_resource_opts(struct sk_buff *skb, struct genl_info *info)
 	struct res_opts res_opts;
 	int err;
 
-	retcode = drbd_adm_prepare(skb, info, DRBD_ADM_NEED_CONN);
+	retcode = drbd_adm_prepare(skb, info, DRBD_ADM_NEED_RESOURCE);
 	if (!adm_ctx.reply_skb)
 		return retcode;
 	if (retcode != NO_ERROR)
@@ -3063,7 +3063,7 @@ int drbd_adm_add_minor(struct sk_buff *skb, struct genl_info *info)
 	struct drbd_genlmsghdr *dh = info->userhdr;
 	enum drbd_ret_code retcode;
 
-	retcode = drbd_adm_prepare(skb, info, DRBD_ADM_NEED_CONN);
+	retcode = drbd_adm_prepare(skb, info, DRBD_ADM_NEED_RESOURCE);
 	if (!adm_ctx.reply_skb)
 		return retcode;
 	if (retcode != NO_ERROR)
@@ -3207,7 +3207,7 @@ int drbd_adm_del_resource(struct sk_buff *skb, struct genl_info *info)
 {
 	enum drbd_ret_code retcode;
 
-	retcode = drbd_adm_prepare(skb, info, DRBD_ADM_NEED_CONN);
+	retcode = drbd_adm_prepare(skb, info, DRBD_ADM_NEED_RESOURCE);
 	if (!adm_ctx.reply_skb)
 		return retcode;
 	if (retcode != NO_ERROR)
-- 
1.7.4.1


  parent reply	other threads:[~2011-10-12 12:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-12 12:27 [RFC 00/13] drbd: part 18 of adding multiple volume support to drbd Philipp Reisner
2011-10-12 12:27 ` [PATCH 01/13] drbd: Lower log priority for an event that is definitely not an error Philipp Reisner
2011-10-12 12:27 ` [PATCH 02/13] drbd: Use DRBD_MINOR_COUNT_DEF in one more place Philipp Reisner
2011-10-12 12:27 ` [PATCH 03/13] drbd: cosmetic: fix accidental division instead of modulo when pretty printing Philipp Reisner
2011-10-12 12:27 ` [PATCH 04/13] drbd: spelling fix: too small Philipp Reisner
2011-10-12 12:27 ` [PATCH 05/13] drbd: Use the terminology suggested by the command names in the source code and messages Philipp Reisner
2011-10-12 12:27 ` [PATCH 06/13] drbd: Also need to check for DRBD_GENLA_F_MANDATORY flags before nla_find_nested() Philipp Reisner
2011-10-12 12:27 ` [PATCH 07/13] drbd: Split off netlink mandatory attribute handling into separate file Philipp Reisner
2011-10-12 12:27 ` Philipp Reisner [this message]
2011-10-12 12:27 ` [PATCH 09/13] drbd: Convert the generic netlink interface to accept connection endpoints Philipp Reisner
2011-10-12 12:27 ` [PATCH 10/13] drbd: Allow to pass resource options to the new-resource command Philipp Reisner
2011-10-12 12:27 ` [PATCH 11/13] drbd: Remove dead code Philipp Reisner
2011-10-12 12:27 ` [PATCH 12/13] drbd: Rename --dry-run to --tentative Philipp Reisner
2011-10-12 12:27 ` [PATCH 13/13] DRBD: Fix comparison always false warning due to long/long long compare Philipp Reisner
2011-10-12 13:35   ` Geert Uytterhoeven
2011-10-13  8:25     ` [Drbd-dev] " Philipp Reisner
2011-10-13  8:43       ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1318422455-17539-9-git-send-email-philipp.reisner@linbit.com \
    --to=philipp.reisner@linbit.com \
    --cc=axboe@kernel.dk \
    --cc=drbd-dev@lists.linbit.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®