[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZR57+cIx6t/2lURA@lore-desk>
Date: Thu, 5 Oct 2023 11:03:53 +0200
From: Lorenzo Bianconi <lorenzo@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: linux-nfs@...r.kernel.org, lorenzo.bianconi@...hat.com,
jlayton@...nel.org, neilb@...e.de, chuck.lever@...cle.com,
netdev@...r.kernel.org
Subject: Re: [PATCH v3] NFSD: convert write_threads, write_maxblksize and
write_maxconn to netlink commands
> 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
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists