From: James Simmons <jsimmons@infradead.org>
To: Andreas Dilger <adilger@whamcloud.com>,
Oleg Drokin <green@whamcloud.com>, NeilBrown <neilb@suse.de>
Cc: Lustre Development List <lustre-devel@lists.lustre.org>
Subject: [lustre-devel] [PATCH 23/27] lustre: obdclass: rename class_parse_nid to class_parse_nid4
Date: Mon, 17 Apr 2023 09:47:19 -0400 [thread overview]
Message-ID: <1681739243-29375-24-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1681739243-29375-1-git-send-email-jsimmons@infradead.org>
From: Mr NeilBrown <neilb@suse.de>
Use the name "nid4" for class_parse_nid(), class_parse_nid_quiet(),
parse_nid() and CLASS_PARSE_NID. This will allow a new
class_parse_nid which handle larger nids.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10391
Lustre-commit: b4a28a3269fadb1059 ("LU-10391 lustre: rename class_parse_nid to class_parse_nid4")
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50088
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
fs/lustre/include/obd_class.h | 5 ++---
fs/lustre/obdclass/obd_config.c | 26 +++++++++++++-------------
fs/lustre/obdclass/obd_mount.c | 8 ++++----
3 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/fs/lustre/include/obd_class.h b/fs/lustre/include/obd_class.h
index f77fd12..2b66bc4 100644
--- a/fs/lustre/include/obd_class.h
+++ b/fs/lustre/include/obd_class.h
@@ -144,10 +144,9 @@ struct cfg_interop_param {
struct cfg_interop_param *class_find_old_param(const char *param,
struct cfg_interop_param *ptr);
int class_get_next_param(char **params, char *copy);
-int class_parse_nid(char *buf, lnet_nid_t *nid, char **endh);
-int class_parse_nid_quiet(char *buf, lnet_nid_t *nid, char **endh);
+int class_parse_nid4(char *buf, lnet_nid_t *nid4, char **endh);
+int class_parse_nid4_quiet(char *buf, lnet_nid_t *nid4, char **endh);
int class_parse_net(char *buf, u32 *net, char **endh);
-int class_match_nid(char *buf, char *key, lnet_nid_t nid);
int class_match_net(char *buf, char *key, u32 net);
struct obd_device *class_incref(struct obd_device *obd,
diff --git a/fs/lustre/obdclass/obd_config.c b/fs/lustre/obdclass/obd_config.c
index 81021e1..eb14ca8 100644
--- a/fs/lustre/obdclass/obd_config.c
+++ b/fs/lustre/obdclass/obd_config.c
@@ -152,12 +152,12 @@ static int class_match_param(char *buf, const char *key, char **valp)
return 0;
}
-static int parse_nid(char *buf, void *value, int quiet)
+static int parse_nid4(char *buf, void *value, int quiet)
{
- lnet_nid_t *nid = value;
+ lnet_nid_t *nid4 = value;
- *nid = libcfs_str2nid(buf);
- if (*nid != LNET_NID_ANY)
+ *nid4 = libcfs_str2nid(buf);
+ if (*nid4 != LNET_NID_ANY)
return 0;
if (!quiet)
@@ -175,7 +175,7 @@ static int parse_net(char *buf, void *value)
}
enum {
- CLASS_PARSE_NID = 1,
+ CLASS_PARSE_NID4 = 1,
CLASS_PARSE_NET,
};
@@ -208,8 +208,8 @@ static int class_parse_value(char *buf, int opc, void *value, char **endh,
switch (opc) {
default:
LBUG();
- case CLASS_PARSE_NID:
- rc = parse_nid(buf, value, quiet);
+ case CLASS_PARSE_NID4:
+ rc = parse_nid4(buf, value, quiet);
break;
case CLASS_PARSE_NET:
rc = parse_net(buf, value);
@@ -223,17 +223,17 @@ static int class_parse_value(char *buf, int opc, void *value, char **endh,
return 0;
}
-int class_parse_nid(char *buf, lnet_nid_t *nid, char **endh)
+int class_parse_nid4(char *buf, lnet_nid_t *nid4, char **endh)
{
- return class_parse_value(buf, CLASS_PARSE_NID, (void *)nid, endh, 0);
+ return class_parse_value(buf, CLASS_PARSE_NID4, (void *)nid4, endh, 0);
}
-EXPORT_SYMBOL(class_parse_nid);
+EXPORT_SYMBOL(class_parse_nid4);
-int class_parse_nid_quiet(char *buf, lnet_nid_t *nid, char **endh)
+int class_parse_nid4_quiet(char *buf, lnet_nid_t *nid4, char **endh)
{
- return class_parse_value(buf, CLASS_PARSE_NID, (void *)nid, endh, 1);
+ return class_parse_value(buf, CLASS_PARSE_NID4, (void *)nid4, endh, 1);
}
-EXPORT_SYMBOL(class_parse_nid_quiet);
+EXPORT_SYMBOL(class_parse_nid4_quiet);
char *lustre_cfg_string(struct lustre_cfg *lcfg, u32 index)
{
diff --git a/fs/lustre/obdclass/obd_mount.c b/fs/lustre/obdclass/obd_mount.c
index 58ca72d..6eaa214 100644
--- a/fs/lustre/obdclass/obd_mount.c
+++ b/fs/lustre/obdclass/obd_mount.c
@@ -228,7 +228,7 @@ int lustre_start_mgc(struct super_block *sb)
/* Use nids from mount line: uml1,1@elan:uml2,2@elan:/lustre */
ptr = lsi->lsi_lmd->lmd_dev;
- if (class_parse_nid(ptr, &nid, &ptr) == 0)
+ if (class_parse_nid4(ptr, &nid, &ptr) == 0)
i++;
if (i == 0) {
CERROR("No valid MGS nids found.\n");
@@ -314,7 +314,7 @@ int lustre_start_mgc(struct super_block *sb)
i = 0;
/* Use nids from mount line: uml1,1@elan:uml2,2@elan:/lustre */
ptr = lsi->lsi_lmd->lmd_dev;
- while (class_parse_nid(ptr, &nid, &ptr) == 0) {
+ while (class_parse_nid4(ptr, &nid, &ptr) == 0) {
rc = do_lcfg(mgcname, nid,
LCFG_ADD_UUID, niduuid, NULL, NULL, NULL);
if (!rc)
@@ -354,7 +354,7 @@ int lustre_start_mgc(struct super_block *sb)
/* New failover node */
sprintf(niduuid, "%s_%x", mgcname, i);
j = 0;
- while (class_parse_nid_quiet(ptr, &nid, &ptr) == 0) {
+ while (class_parse_nid4_quiet(ptr, &nid, &ptr) == 0) {
rc = do_lcfg(mgcname, nid, LCFG_ADD_UUID, niduuid,
NULL, NULL, NULL);
if (!rc)
@@ -870,7 +870,7 @@ static int lmd_parse_mgs(struct lustre_mount_data *lmd, char **ptr)
int oldlen = 0;
/* Find end of nidlist */
- while (class_parse_nid_quiet(tail, &nid, &tail) == 0)
+ while (class_parse_nid4_quiet(tail, &nid, &tail) == 0)
;
length = tail - *ptr;
if (length == 0) {
--
1.8.3.1
_______________________________________________
lustre-devel mailing list
lustre-devel@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
next prev parent reply other threads:[~2023-04-17 14:07 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 13:46 [lustre-devel] [PATCH 00/27] lustre: sync to OpenSFS branch April 17, 2023 James Simmons
2023-04-17 13:46 ` [lustre-devel] [PATCH 01/27] lustre: llite: fix the wrong beyond read end calculation James Simmons
2023-04-17 13:46 ` [lustre-devel] [PATCH 02/27] lustre: lov: continue fsync on other OST objs even on -ENOENT James Simmons
2023-04-17 13:46 ` [lustre-devel] [PATCH 03/27] lustre: llite: protect cp_state with vmpage lock James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 04/27] lustre: llite: restart clio for AIO if necessary James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 05/27] lustre: protocol: add OBD_BRW_COMPRESSED James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 06/27] lustre: llite: call truncate_inode_pages() under inode lock James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 07/27] lustre: fid: reduce LUSTRE_DATA_SEQ_MAX_WIDTH James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 08/27] lnet: handle multi-rail setups James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 09/27] lustre: readahead: clip readahead with kms James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 10/27] lnet: use discovered ni status to set initial health James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 11/27] lnet: add 'lock_prim_nid" lnet module parameter James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 12/27] lustre: obdclass: fix rpc slot leakage James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 13/27] lnet: libcfs: cleanup console messages James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 14/27] lustre: ldlm: clear lock converting flag on resource cleanup James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 15/27] lustre: statahead: statahead thread doesn't stop James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 16/27] lustre: uapi: fix unused function errors James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 17/27] lnet: Health logging improvements James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 18/27] lustre: update version to 2.15.54 James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 19/27] lustre: misc: remove unnecessary ioctl typecasts James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 20/27] lustre: llite: move common ioctl code to ll_iocontrol() James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 21/27] lnet: change LNetAddPeer() to take struct lnet_nid James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 22/27] lustre: obdclass: change class_add/check_uuid to large nid James Simmons
2023-04-17 13:47 ` James Simmons [this message]
2023-04-17 13:47 ` [lustre-devel] [PATCH 24/27] lustre: llite: only first sync to MDS matter James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 25/27] lustre: statahead: batched statahead processing James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 26/27] lustre: llite: fix LSOM blocks for ftruncate and close James Simmons
2023-04-17 13:47 ` [lustre-devel] [PATCH 27/27] lnet: fix clang build errors James Simmons
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=1681739243-29375-24-git-send-email-jsimmons@infradead.org \
--to=jsimmons@infradead.org \
--cc=adilger@whamcloud.com \
--cc=green@whamcloud.com \
--cc=lustre-devel@lists.lustre.org \
--cc=neilb@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).