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 05/13] drbd: Use the terminology suggested by the command names in the source code and messages
Date: Wed, 12 Oct 2011 14:27:27 +0200 [thread overview]
Message-ID: <1318422455-17539-6-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 | 16 ++++++++--------
include/linux/drbd.h | 4 ++--
include/linux/drbd_genl.h | 17 ++++-------------
3 files changed, 14 insertions(+), 23 deletions(-)
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index 261b512..8be3bef 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -71,8 +71,8 @@ err_out:
int drbd_adm_add_minor(struct sk_buff *skb, struct genl_info *info);
int drbd_adm_delete_minor(struct sk_buff *skb, struct genl_info *info);
-int drbd_adm_create_connection(struct sk_buff *skb, struct genl_info *info);
-int drbd_adm_delete_connection(struct sk_buff *skb, struct genl_info *info);
+int drbd_adm_new_resource(struct sk_buff *skb, struct genl_info *info);
+int drbd_adm_del_resource(struct sk_buff *skb, struct genl_info *info);
int drbd_adm_down(struct sk_buff *skb, struct genl_info *info);
int drbd_adm_set_role(struct sk_buff *skb, struct genl_info *info);
@@ -3021,7 +3021,7 @@ drbd_check_conn_name(const char *name)
return NO_ERROR;
}
-int drbd_adm_create_connection(struct sk_buff *skb, struct genl_info *info)
+int drbd_adm_new_resource(struct sk_buff *skb, struct genl_info *info)
{
enum drbd_ret_code retcode;
@@ -3038,7 +3038,7 @@ int drbd_adm_create_connection(struct sk_buff *skb, struct genl_info *info)
if (adm_ctx.tconn) {
if (info->nlhdr->nlmsg_flags & NLM_F_EXCL) {
retcode = ERR_INVALID_REQUEST;
- drbd_msg_put_info("connection exists");
+ drbd_msg_put_info("resource exists");
}
/* else: still NO_ERROR */
goto out;
@@ -3133,7 +3133,7 @@ int drbd_adm_down(struct sk_buff *skb, struct genl_info *info)
goto out;
if (!adm_ctx.tconn) {
- retcode = ERR_CONN_NOT_KNOWN;
+ retcode = ERR_RES_NOT_KNOWN;
goto out;
}
@@ -3187,7 +3187,7 @@ int drbd_adm_down(struct sk_buff *skb, struct genl_info *info)
retcode = NO_ERROR;
} else {
/* "can not happen" */
- retcode = ERR_CONN_IN_USE;
+ retcode = ERR_RES_IN_USE;
drbd_msg_put_info("failed to delete connection");
}
goto out;
@@ -3196,7 +3196,7 @@ out:
return 0;
}
-int drbd_adm_delete_connection(struct sk_buff *skb, struct genl_info *info)
+int drbd_adm_del_resource(struct sk_buff *skb, struct genl_info *info)
{
enum drbd_ret_code retcode;
@@ -3213,7 +3213,7 @@ int drbd_adm_delete_connection(struct sk_buff *skb, struct genl_info *info)
retcode = NO_ERROR;
} else {
- retcode = ERR_CONN_IN_USE;
+ retcode = ERR_RES_IN_USE;
}
if (retcode == NO_ERROR)
diff --git a/include/linux/drbd.h b/include/linux/drbd.h
index fedda00..161cd41 100644
--- a/include/linux/drbd.h
+++ b/include/linux/drbd.h
@@ -155,8 +155,8 @@ enum drbd_ret_code {
ERR_CONG_NOT_PROTO_A = 155,
ERR_PIC_AFTER_DEP = 156,
ERR_PIC_PEER_DEP = 157,
- ERR_CONN_NOT_KNOWN = 158,
- ERR_CONN_IN_USE = 159,
+ ERR_RES_NOT_KNOWN = 158,
+ ERR_RES_IN_USE = 159,
ERR_MINOR_CONFIGURED = 160,
ERR_MINOR_EXISTS = 161,
ERR_INVALID_REQUEST = 162,
diff --git a/include/linux/drbd_genl.h b/include/linux/drbd_genl.h
index 4ceecb9..47ef324 100644
--- a/include/linux/drbd_genl.h
+++ b/include/linux/drbd_genl.h
@@ -253,25 +253,16 @@ GENL_op(
GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_GENLA_F_MANDATORY)
)
-#if 0
- /* TO BE DONE */
- /* create or destroy resources, aka replication groups */
-GENL_op(DRBD_ADM_CREATE_RESOURCE, 3, GENL_doit(drbd_adm_create_resource),
- GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED))
-GENL_op(DRBD_ADM_DELETE_RESOURCE, 4, GENL_doit(drbd_adm_delete_resource),
- GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED))
-#endif
-
/* add DRBD minor devices as volumes to resources */
-GENL_op(DRBD_ADM_ADD_MINOR, 5, GENL_doit(drbd_adm_add_minor),
+GENL_op(DRBD_ADM_NEW_MINOR, 5, GENL_doit(drbd_adm_add_minor),
GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED))
GENL_op(DRBD_ADM_DEL_MINOR, 6, GENL_doit(drbd_adm_delete_minor),
GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED))
- /* add or delete replication links to resources */
-GENL_op(DRBD_ADM_ADD_LINK, 7, GENL_doit(drbd_adm_create_connection),
+ /* add or delete resources */
+GENL_op(DRBD_ADM_NEW_RESOURCE, 7, GENL_doit(drbd_adm_new_resource),
GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED))
-GENL_op(DRBD_ADM_DEL_LINK, 8, GENL_doit(drbd_adm_delete_connection),
+GENL_op(DRBD_ADM_DEL_RESOURCE, 8, GENL_doit(drbd_adm_del_resource),
GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED))
GENL_op(DRBD_ADM_RESOURCE_OPTS, 9,
--
1.7.4.1
next prev parent reply other threads:[~2011-10-12 12:31 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 ` Philipp Reisner [this message]
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 ` [PATCH 08/13] drbd: Rename DRBD_ADM_NEED_{CONN -> RESOURCE} Philipp Reisner
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-6-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®