From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: Jeff Layton <jlayton@redhat.com>
Cc: "bfields@fieldses.org" <bfields@fieldses.org>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"devel@openvz.org" <devel@openvz.org>,
"Trond.Myklebust@netapp.com" <Trond.Myklebust@netapp.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 03/15] nfsd: make reclaim_str_hashtbl allocated per net
Date: Wed, 14 Nov 2012 17:22:53 +0400 [thread overview]
Message-ID: <50A39B2D.6070206@parallels.com> (raw)
In-Reply-To: <20121114080247.67cd6b45@tlielax.poochiereds.net>
14.11.2012 17:02, Jeff Layton пишет:
> On Tue, 13 Nov 2012 18:48:33 +0300
> Stanislav Kinsbursky <skinsbursky@parallels.com> wrote:
>
<snip>
>>
>> +
>> +static int
>> +nfs4_legacy_state_init(struct net *net)
>> +{
>> + struct nfsd_net *nn = net_generic(net, nfsd_net_id);
>> + int i;
>> +
>> + nn->reclaim_str_hashtbl = kmalloc(sizeof(struct list_head) *
>> + CLIENT_HASH_SIZE, GFP_KERNEL);
>> + if (!nn->reclaim_str_hashtbl)
>> + return -ENOMEM;
>> +
>> + for (i = 0; i < CLIENT_HASH_SIZE; i++)
>> + INIT_LIST_HEAD(&nn->reclaim_str_hashtbl[i]);
>> + nn->reclaim_str_hashtbl_size = 0;
>> +
>> + return 0;
>> +}
>> +
>> +static void
>> +nfs4_legacy_state_shutdown(struct net *net)
>> +{
>> + struct nfsd_net *nn = net_generic(net, nfsd_net_id);
>> +
>> + kfree(nn->reclaim_str_hashtbl);
>> +}
>> +
>> static int
>> nfsd4_load_reboot_recovery_data(struct net *net)
>> {
>> @@ -425,13 +454,23 @@ nfsd4_load_reboot_recovery_data(struct net *net)
>> return -EINVAL;
>> }
>>
>> + status = nfs4_legacy_state_init(net);
>> + if (status)
>> + return status;
>> +
>
> nit: might be clearer to create a new legacy ->init function and have
> it call the state_init and then load the recovery data.
>
Yep, sure.
>
> Looks like a reasonable and good change, but may need reconciling with
> the patches from me that Bruce merged recently into his for-next tree.
>
Thanks. Already working on it.
--
Best regards,
Stanislav Kinsbursky
next prev parent reply other threads:[~2012-11-14 13:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-13 15:48 [RFC PATCH 00/15] NFSd state containerization Stanislav Kinsbursky
2012-11-13 15:48 ` [PATCH 01/15] nfsd: use service net instead of hard-coded net where possible Stanislav Kinsbursky
2012-11-13 15:48 ` [PATCH 02/15] nfsd: make nfs4_client network namespace dependent Stanislav Kinsbursky
2012-11-13 15:48 ` [PATCH 03/15] nfsd: make reclaim_str_hashtbl allocated per net Stanislav Kinsbursky
2012-11-14 13:02 ` Jeff Layton
2012-11-14 13:22 ` Stanislav Kinsbursky [this message]
2012-11-13 15:48 ` [PATCH 04/15] nfsd: make conf_id_hashtbl " Stanislav Kinsbursky
2012-11-13 15:48 ` [PATCH 05/15] nfsd: make conf_str_hashtbl " Stanislav Kinsbursky
2012-11-14 13:04 ` Jeff Layton
2012-11-13 15:48 ` [PATCH 06/15] nfsd: make unconf_str_hashtbl " Stanislav Kinsbursky
2012-11-14 13:20 ` Jeff Layton
2012-11-13 15:48 ` [PATCH 07/15] nfsd: make unconf_str_hastbl " Stanislav Kinsbursky
2012-11-13 15:48 ` [PATCH 08/15] nfsd: make ownerstr_hashtbl " Stanislav Kinsbursky
2012-11-13 15:49 ` [PATCH 09/15] nfsd: make lockowner_ino_hashtbl " Stanislav Kinsbursky
2012-11-13 15:49 ` [PATCH 10/15] nfsd: make sessionid_hashtbl " Stanislav Kinsbursky
2012-11-13 15:49 ` [PATCH 11/15] nfsd: make client_lru list " Stanislav Kinsbursky
2012-11-13 15:49 ` [PATCH 12/15] nfsd: make close_lru " Stanislav Kinsbursky
2012-11-13 15:49 ` [PATCH 13/15] nfsd: use service net instead of hard-coded init_net Stanislav Kinsbursky
2012-11-13 15:49 ` [PATCH 14/15] nfsd: pass nfsd_net instead of net to grace enders Stanislav Kinsbursky
2012-11-13 15:49 ` [PATCH 15/15] nfsd: make laundromat network namespace aware Stanislav Kinsbursky
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=50A39B2D.6070206@parallels.com \
--to=skinsbursky@parallels.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bfields@fieldses.org \
--cc=devel@openvz.org \
--cc=jlayton@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@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;
as well as URLs for NNTP newsgroup(s).