From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: linux-nfs@vger.kernel.org, lorenzo.bianconi@redhat.com,
jlayton@kernel.org, neilb@suse.de, chuck.lever@oracle.com,
netdev@vger.kernel.org
Subject: Re: [PATCH v3] NFSD: convert write_threads, write_maxblksize and write_maxconn to netlink commands
Date: Thu, 5 Oct 2023 11:03:53 +0200 [thread overview]
Message-ID: <ZR57+cIx6t/2lURA@lore-desk> (raw)
In-Reply-To: <20231004100955.32417c33@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 912 bytes --]
> On Wed, 27 Sep 2023 00:13:15 +0200 Lorenzo Bianconi wrote:
> > +int nfsd_nl_threads_set_doit(struct sk_buff *skb, struct genl_info *info)
> > +{
> > + u32 nthreads;
> > + int ret;
> > +
> > + if (!info->attrs[NFSD_A_CONTROL_PLANE_THREADS])
> > + return -EINVAL;
>
> Consider using GENL_REQ_ATTR_CHECK(), it will auto-add nice error
> message to the reply on error.
ack, I will fix it.
>
> > + nthreads = nla_get_u32(info->attrs[NFSD_A_CONTROL_PLANE_THREADS]);
> > +
> > + ret = nfsd_svc(nthreads, genl_info_net(info), get_current_cred());
> > + return ret == nthreads ? 0 : ret;
> > +}
> > +
> > +static int nfsd_nl_get_dump(struct sk_buff *skb, struct netlink_callback *cb,
> > + int cmd, int attr, u32 val)
>
> YNL will dutifully return a list for every dump. If you're only getting
> a single reply 'do' will be much better.
ack, I will fix it.
Regards,
Lorenzo
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2023-10-05 9:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-26 22:13 [PATCH v3] NFSD: convert write_threads, write_maxblksize and write_maxconn to netlink commands Lorenzo Bianconi
2023-09-26 23:05 ` NeilBrown
2023-09-26 23:09 ` Chuck Lever III
2023-09-29 13:44 ` Chuck Lever
2023-10-01 16:56 ` Lorenzo Bianconi
2023-10-02 13:25 ` Jeff Layton
2023-10-02 15:19 ` Chuck Lever III
2023-10-02 15:53 ` Jeff Layton
2023-10-04 17:09 ` Jakub Kicinski
2023-10-05 9:03 ` Lorenzo Bianconi [this message]
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=ZR57+cIx6t/2lURA@lore-desk \
--to=lorenzo@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=neilb@suse.de \
--cc=netdev@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