From: Scott Mayhew <smayhew@redhat.com>
To: steved@redhat.com
Cc: jlayton@kernel.org, yoyang@redhat.com, linux-nfs@vger.kernel.org
Subject: [nfs-utils PATCH] nfsdctl: debug logging fixups
Date: Wed, 15 Jan 2025 12:00:51 -0500 [thread overview]
Message-ID: <20250115170051.8947-1-smayhew@redhat.com> (raw)
In-Reply-To: <0068c0d811976aca15818b60192a96ca017893f8.camel@kernel.org>
Move read_nfsd_conf() out of autostart_func() and into main(). Remove
hard-coded NFSD_FAMILY_NAME in the first error message in
netlink_msg_alloc() and make the error messages in netlink_msg_alloc()
more descriptive/unique.
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
SteveD - this would go on top of Jeff's "nfsdctl: add support for new
lockd configuration interface" patches.
utils/nfsdctl/nfsdctl.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/utils/nfsdctl/nfsdctl.c b/utils/nfsdctl/nfsdctl.c
index 003daba5..f81c78ae 100644
--- a/utils/nfsdctl/nfsdctl.c
+++ b/utils/nfsdctl/nfsdctl.c
@@ -436,7 +436,7 @@ static struct nl_msg *netlink_msg_alloc(struct nl_sock *sock, const char *family
id = genl_ctrl_resolve(sock, family);
if (id < 0) {
- xlog(L_ERROR, "%s not found", NFSD_FAMILY_NAME);
+ xlog(L_ERROR, "failed to resolve %s generic netlink family", family);
return NULL;
}
@@ -447,7 +447,7 @@ static struct nl_msg *netlink_msg_alloc(struct nl_sock *sock, const char *family
}
if (!genlmsg_put(msg, 0, 0, id, 0, 0, 0, 0)) {
- xlog(L_ERROR, "failed to allocate netlink message");
+ xlog(L_ERROR, "failed to add generic netlink headers to netlink message");
nlmsg_free(msg);
return NULL;
}
@@ -1509,8 +1509,6 @@ static int autostart_func(struct nl_sock *sock, int argc, char ** argv)
}
}
- read_nfsd_conf();
-
grace = conf_get_num("nfsd", "grace-time", 0);
ret = lockd_configure(sock, grace);
if (ret) {
@@ -1728,6 +1726,8 @@ int main(int argc, char **argv)
xlog_syslog(0);
xlog_stderr(1);
+ read_nfsd_conf();
+
/* Parse the preliminary options */
while ((opt = getopt_long(argc, argv, "+hdsV", pre_options, NULL)) != -1) {
switch (opt) {
--
2.48.0
next prev parent reply other threads:[~2025-01-15 17:00 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 13:46 [PATCH v2 0/3] nfsdctl: add support for new lockd configuration interface Jeff Layton
2025-01-10 13:46 ` [PATCH v2 1/3] nfsdctl: convert to xlog() Jeff Layton
2025-01-10 13:46 ` [PATCH v2 2/3] nfsdctl: fix the --version option Jeff Layton
2025-01-10 13:46 ` [PATCH v2 3/3] nfsdctl: add necessary bits to configure lockd Jeff Layton
2025-01-10 15:05 ` Tom Talpey
2025-01-10 15:21 ` Jeff Layton
2025-01-10 15:40 ` Tom Talpey
2025-01-13 13:39 ` Benjamin Coddington
2025-01-14 15:53 ` Tom Talpey
2025-01-14 21:09 ` [PATCH v2 0/3] nfsdctl: add support for new lockd configuration interface Scott Mayhew
2025-01-14 21:18 ` Jeff Layton
2025-01-15 14:44 ` Scott Mayhew
2025-01-15 14:56 ` Jeff Layton
2025-01-15 15:12 ` Steve Dickson
2025-01-15 15:28 ` Jeff Layton
2025-01-15 16:40 ` Scott Mayhew
2025-01-15 17:00 ` Scott Mayhew [this message]
2025-01-15 17:02 ` [nfs-utils PATCH] nfsdctl: debug logging fixups Jeff Layton
2025-01-15 17:32 ` Steve Dickson
2025-01-15 17:35 ` Jeff Layton
2025-01-15 17:47 ` Steve Dickson
2025-01-15 18:33 ` Jeff Layton
2025-01-15 20:53 ` Steve Dickson
2025-01-16 11:50 ` Jeff Layton
2025-01-16 21:00 ` Steve Dickson
2025-01-16 21:12 ` Jeff Layton
2025-03-19 19:47 ` [PATCH v2 0/3] nfsdctl: add support for new lockd configuration interface Steve Dickson
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=20250115170051.8947-1-smayhew@redhat.com \
--to=smayhew@redhat.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.com \
--cc=yoyang@redhat.com \
/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