From: Dave Chinner <david@fromorbit.com>
To: Glauber Costa <glommer@parallels.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
containers@lists.linux-foundation.org,
Pavel Emelyanov <xemul@parallels.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Hugh Dickins <hughd@google.com>, Nick Piggin <npiggin@kernel.dk>,
Andrea Arcangeli <aarcange@redhat.com>,
Rik van Riel <riel@redhat.com>,
Dave Hansen <dave@linux.vnet.ibm.com>,
James Bottomley <JBottomley@parallels.com>,
Eric Dumazet <eric.dumazet@gmail.com>
Subject: Re: [PATCH v3 4/4] parse options in the vfs level
Date: Mon, 15 Aug 2011 17:09:32 +1000 [thread overview]
Message-ID: <20110815070932.GF26978@dastard> (raw)
In-Reply-To: <1313334832-1150-5-git-send-email-glommer@parallels.com>
On Sun, Aug 14, 2011 at 07:13:52PM +0400, Glauber Costa wrote:
> This patch introduces a simple generic vfs option parser.
> Right now, the only option we have is to limit the size of the dcache.
>
> So any user that wants to have a dcache entries limit, can specify:
>
> mount -o whatever_options,vfs_dcache_size=XXX <dev> <mntpoint>
>
> It is supposed to work well with remounts, allowing it to change
> multiple over the course of the filesystem's lifecycle.
>
> I find mount a natural interface for handling filesystem options,
> so that's what I've choosen. Feel free to yell at it at will if
> you disagree.
It's already been noted by both myself and Al that there is not a
1:1 mapping between mount point and superblocks....
> @@ -2350,6 +2449,12 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
> else
> retval = do_new_mount(&path, type_page, flags, mnt_flags,
> dev_name, data_page);
> +
> + /* bind mounts get to respect their parents decision */
> + if (!retval && !(flags & MS_BIND))
> + vfs_set_dcache_size(path.mnt->mnt_sb,
> + vfs_options.vfs_dcache_size);
> +
And I'm not sure that silently ignoring it in certain cases
is the best way around that problem.
> dput_out:
> path_put(&path);
> return retval;
> diff --git a/include/linux/dcache.h b/include/linux/dcache.h
> index d37d2a7..1a309f3 100644
> --- a/include/linux/dcache.h
> +++ b/include/linux/dcache.h
> @@ -251,6 +251,10 @@ extern int d_invalidate(struct dentry *);
>
> /* only used at mount-time */
> extern struct dentry * d_alloc_root(struct inode *);
> +extern int vfs_set_dcache_size(struct super_block *sb, int size);
> +
> +#define DCACHE_MIN_SIZE 1024
> +extern int vfs_set_dcache_size(struct super_block *sb, int size);
Where did this minimum size come from and why was that figure
chosen? Needs documenting.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2011-08-15 7:09 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-14 15:13 [PATCH v3 0/4] Per-container dcache limitation Glauber Costa
2011-08-14 15:13 ` Glauber Costa
[not found] ` <1313334832-1150-1-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-08-14 15:13 ` [PATCH v3 1/4] factor out single-shrinker code Glauber Costa
2011-08-14 15:13 ` Glauber Costa
[not found] ` <1313334832-1150-2-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-08-15 6:43 ` Dave Chinner
2011-08-15 6:43 ` Dave Chinner
2011-08-14 15:13 ` [PATCH v3 2/4] Keep nr_dentry per super block Glauber Costa
2011-08-14 15:13 ` Glauber Costa
[not found] ` <1313334832-1150-3-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-08-14 17:38 ` Eric Dumazet
2011-08-14 17:38 ` Eric Dumazet
2011-08-14 17:38 ` Eric Dumazet
2011-08-14 15:13 ` [PATCH v3 3/4] limit nr_dentries per superblock Glauber Costa
2011-08-14 15:13 ` Glauber Costa
2011-08-15 7:03 ` Dave Chinner
[not found] ` <1313334832-1150-4-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-08-15 7:03 ` Dave Chinner
2011-08-15 7:12 ` Pekka Enberg
2011-08-15 7:12 ` Pekka Enberg
2011-08-15 10:46 ` Dave Chinner
2011-08-15 10:58 ` Pekka Enberg
2011-08-15 10:58 ` Pekka Enberg
2011-08-15 11:05 ` Pavel Emelyanov
[not found] ` <4E48FD8A.90401-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-08-15 11:14 ` Pekka Enberg
2011-08-15 11:14 ` Pekka Enberg
[not found] ` <CAOJsxLFjZffC9i5kQsBWjGy3eWdj3VMB5awz=yPcwgeKb5BG0Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-15 11:32 ` Pavel Emelyanov
2011-08-16 2:11 ` Dave Chinner
2011-08-15 11:32 ` Pavel Emelyanov
[not found] ` <4E4903C1.9050207-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-08-15 11:55 ` Pekka Enberg
2011-08-15 11:55 ` Pekka Enberg
2011-08-15 12:12 ` Pavel Emelyanov
[not found] ` <4E490D47.8050105-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-08-15 12:23 ` Pekka Enberg
2011-08-15 12:23 ` Pekka Enberg
[not found] ` <CAOJsxLEVfGrzUQv0fOpOyw3AaOLOHcWbvLJL1NdrHS6M2j5o1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-15 12:37 ` Pavel Emelyanov
2011-08-15 12:37 ` Pavel Emelyanov
[not found] ` <CAOJsxLErFcxuuqnWkRbOAHEFbeGrKp3YMZ-144=m16oBXCHJ2g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-15 12:12 ` Pavel Emelyanov
2011-08-16 2:11 ` Dave Chinner
[not found] ` <CAOJsxLGFJmqO-W=itQbO4Mh4DxSD4wrHOC8gQ5bWL5aE1YYeQw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-15 11:05 ` Pavel Emelyanov
[not found] ` <CAOJsxLFYD9DkEU5R+9fZr-uaznteP8-BUC_Ti+FnNFqtbOCHSw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-15 10:46 ` Dave Chinner
2011-08-14 15:13 ` [PATCH v3 4/4] parse options in the vfs level Glauber Costa
2011-08-14 15:13 ` Glauber Costa
2011-08-14 15:39 ` Vasiliy Kulikov
2011-08-15 0:03 ` Glauber Costa
2011-08-15 0:03 ` Glauber Costa
[not found] ` <1313334832-1150-5-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-08-14 15:39 ` Vasiliy Kulikov
2011-08-15 7:09 ` Dave Chinner
2011-08-15 7:09 ` Dave Chinner [this message]
2011-08-24 2:19 ` Glauber Costa
2011-08-24 2:19 ` Glauber Costa
2011-08-17 5:43 ` [PATCH v3 0/4] Per-container dcache limitation Dave Chinner
2011-08-17 5:43 ` Dave Chinner
2011-08-17 18:44 ` Glauber Costa
2011-08-17 18:44 ` Glauber Costa
2011-08-18 1:27 ` Dave Chinner
2011-08-18 1:27 ` Dave Chinner
2011-08-22 11:42 ` Glauber Costa
2011-08-22 11:42 ` Glauber Costa
2011-08-22 11:42 ` Glauber Costa
[not found] ` <4E4C0C25.3-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-08-18 1:27 ` Dave Chinner
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=20110815070932.GF26978@dastard \
--to=david@fromorbit.com \
--cc=JBottomley@parallels.com \
--cc=aarcange@redhat.com \
--cc=containers@lists.linux-foundation.org \
--cc=dave@linux.vnet.ibm.com \
--cc=eric.dumazet@gmail.com \
--cc=glommer@parallels.com \
--cc=hughd@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@kernel.dk \
--cc=riel@redhat.com \
--cc=viro@zeniv.linux.org.uk \
--cc=xemul@parallels.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.