From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: [PATCH review 1/6] mnt: Track which mounts use a dentry as root. Date: Fri, 07 Aug 2015 10:43:25 -0500 Message-ID: <871tffkste.fsf@x220.int.ebiederm.org> References: <871tncuaf6.fsf@x220.int.ebiederm.org> <87mw5xq7lt.fsf@x220.int.ebiederm.org> <87a8yqou41.fsf_-_@x220.int.ebiederm.org> <874moq9oyb.fsf_-_@x220.int.ebiederm.org> <871tfkawu9.fsf_-_@x220.int.ebiederm.org> <87vbcw9i8g.fsf_-_@x220.int.ebiederm.org> <55C48C94.6050804@kyup.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Linux Containers , Andrey Vagin , Miklos Szeredi , Richard Weinberger , Andy Lutomirski , "J. Bruce Fields" , Al Viro , linux-fsdevel@vger.kernel.org, Jann Horn , Linus Torvalds , Willy Tarreau To: Nikolay Borisov Return-path: Received: from out03.mta.xmission.com ([166.70.13.233]:55510 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932116AbbHGPuR (ORCPT ); Fri, 7 Aug 2015 11:50:17 -0400 In-Reply-To: <55C48C94.6050804@kyup.com> (Nikolay Borisov's message of "Fri, 7 Aug 2015 13:46:44 +0300") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Nikolay Borisov writes: >> diff --git a/fs/namespace.c b/fs/namespace.c >> index 2b8aa15fd6df..2ce987af9afa 100644 >> --- a/fs/namespace.c >> +++ b/fs/namespace.c >> @@ -31,6 +31,8 @@ static unsigned int m_hash_mask __read_mostly; >> static unsigned int m_hash_shift __read_mostly; >> static unsigned int mp_hash_mask __read_mostly; >> static unsigned int mp_hash_shift __read_mostly; >> +static unsigned int mr_hash_mask __read_mostly; >> +static unsigned int mr_hash_shift __read_mostly; >> >> static __initdata unsigned long mhash_entries; >> static int __init set_mhash_entries(char *str) >> @@ -52,6 +54,16 @@ static int __init set_mphash_entries(char *str) >> } >> __setup("mphash_entries=", set_mphash_entries); >> >> +static __initdata unsigned long mrhash_entries; >> +static int __init set_mrhash_entries(char *str) >> +{ >> + if (!str) >> + return 0; >> + mrhash_entries = simple_strtoul(str, &str, 0); > > Nit: Any particular reason for using simple_* rather than kstrto* family > of functions? That is what set_mhash_entries, and set_mphash_entries do, and I maintained the existing style in the code. It does look like a followup change to add error handling in the pathological cases might be worthwhile. Although it would probably be even better to convert these hash tables into rcu resizeable hash tables that can automatically grow to the size needed. Eric