04 Jan, 2012

2 commits


21 Jul, 2011

1 commit

  • Moving the event counter into the dynamically allocated 'struc seq_file'
    allows poll() support without the need to allocate its own tracking
    structure.

    All current users are switched over to use the new counter.

    Requested-by: Andrew Morton akpm@linux-foundation.org
    Acked-by: NeilBrown
    Tested-by: Lucas De Marchi lucas.demarchi@profusion.mobi
    Signed-off-by: Kay Sievers
    Signed-off-by: Al Viro

    Kay Sievers
     

04 Mar, 2010

1 commit


18 Dec, 2009

1 commit

  • This reverts commit e9496ff46a20a8592fdc7bdaaf41b45eb808d310. Quoth Al:

    "it's dependent on a lot of other stuff not currently in mainline
    and badly broken with current fs/namespace.c. Sorry, badly
    out-of-order cherry-pick from old queue.

    PS: there's a large pending series reworking the refcounting and
    lifetime rules for vfsmounts that will, among other things, allow to
    rip a subtree away _without_ dissolving connections in it, to be
    garbage-collected when all active references are gone. It's
    considerably saner wrt "is the subtree busy" logics, but it's nowhere
    near being ready for merge at the moment; this changeset is one of the
    things becoming possible with that sucker, but it certainly shouldn't
    have been picked during this cycle. My apologies..."

    Noticed-by: Eric Paris
    Requested-by: Al Viro
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

17 Dec, 2009

1 commit


09 Jul, 2009

1 commit

  • Fix various silly problems wrt mnt_namespace.h:

    - exit_mnt_ns() isn't used, remove it
    - done that, sched.h and nsproxy.h inclusions aren't needed
    - mount.h inclusion was need for vfsmount_lock, but no longer
    - remove mnt_namespace.h inclusion from files which don't use anything
    from mnt_namespace.h

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

23 Jun, 2009

2 commits

  • The purpose of this patch is to improve the remote mount path lookup
    support for distributed filesystems such as the NFSv4 client.

    When given a mount command of the form "mount server:/foo/bar /mnt", the
    NFSv4 client is required to look up the filehandle for "server:/", and
    then look up each component of the remote mount path "foo/bar" in order
    to find the directory that is actually going to be mounted on /mnt.
    Following that remote mount path may involve following symlinks,
    crossing server-side mount points and even following referrals to
    filesystem volumes on other servers.

    Since the standard VFS path lookup code already supports walking paths
    that contain all these features (using in-kernel automounts for
    following referrals) we would like to be able to reuse that rather than
    duplicate the full path traversal functionality in the NFSv4 client code.

    This patch therefore defines a VFS helper function create_mnt_ns(), that
    sets up a temporary filesystem namespace and attaches a root filesystem to
    it. It exports the create_mnt_ns() and put_mnt_ns() function for use by
    filesystem modules.

    Signed-off-by: Trond Myklebust
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     
  • In order to allow modules to use it without having to export vfsmount_lock.

    Signed-off-by: Trond Myklebust
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     

01 Apr, 2009

1 commit


23 Apr, 2008

2 commits

  • [mszeredi@suse.cz] rewrite and split big patch into managable chunks

    /proc/mounts in its current form lacks important information:

    - propagation state
    - root of mount for bind mounts
    - the st_dev value used within the filesystem
    - identifier for each mount and it's parent

    It also suffers from the following problems:

    - not easily extendable
    - ambiguity of mountpoints within a chrooted environment
    - doesn't distinguish between filesystem dependent and independent options
    - doesn't distinguish between per mount and per super block options

    This patch introduces /proc//mountinfo which attempts to address
    all these deficiencies.

    Code shared between /proc//mounts and /proc//mountinfo is
    extracted into separate functions.

    Thanks to Al Viro for the help in getting the design right.

    Signed-off-by: Ram Pai
    Signed-off-by: Miklos Szeredi
    Signed-off-by: Al Viro

    Ram Pai
     
  • Allow /proc//mountinfo to use the root of to calculate
    mountpoints.

    - move definition of 'struct proc_mounts' to
    - add the process's namespace and root to this structure
    - pass a pointer to 'struct proc_mounts' into seq_operations

    In addition the following cleanups are made:

    - use a common open function for /proc//{mounts,mountstat}
    - surround namespace.c part of these proc files with #ifdef CONFIG_PROC_FS
    - make the seq_operations structures const

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Al Viro

    Miklos Szeredi
     

17 Jul, 2007

1 commit

  • While working on unshare support for the network namespace I noticed we
    were putting clone flags in an int. Which is weird because the syscall
    uses unsigned long and we at least need an unsigned to properly hold all of
    the unshare flags.

    So to make the code consistent, this patch updates the code to use
    unsigned long instead of int for the clone flags in those places
    where we get it wrong today.

    Signed-off-by: Eric W. Biederman
    Acked-by: Cedric Le Goater
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

09 May, 2007

1 commit

  • sys_clone() and sys_unshare() both makes copies of nsproxy and its associated
    namespaces. But they have different code paths.

    This patch merges all the nsproxy and its associated namespace copy/clone
    handling (as much as possible). Posted on container list earlier for
    feedback.

    - Create a new nsproxy and its associated namespaces and pass it back to
    caller to attach it to right process.

    - Changed all copy_*_ns() routines to return a new copy of namespace
    instead of attaching it to task->nsproxy.

    - Moved the CAP_SYS_ADMIN checks out of copy_*_ns() routines.

    - Removed unnessary !ns checks from copy_*_ns() and added BUG_ON()
    just incase.

    - Get rid of all individual unshare_*_ns() routines and make use of
    copy_*_ns() instead.

    [akpm@osdl.org: cleanups, warning fix]
    [clg@fr.ibm.com: remove dup_namespaces() declaration]
    [serue@us.ibm.com: fix CONFIG_IPC_NS=n, clone(CLONE_NEWIPC) retval]
    [akpm@linux-foundation.org: fix build with CONFIG_SYSVIPC=n]
    Signed-off-by: Badari Pulavarty
    Signed-off-by: Serge Hallyn
    Cc: Cedric Le Goater
    Cc: "Eric W. Biederman"
    Cc:
    Signed-off-by: Cedric Le Goater
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Badari Pulavarty
     

09 Dec, 2006

1 commit

  • Rename 'struct namespace' to 'struct mnt_namespace' to avoid confusion with
    other namespaces being developped for the containers : pid, uts, ipc, etc.
    'namespace' variables and attributes are also renamed to 'mnt_ns'

    Signed-off-by: Kirill Korotaev
    Signed-off-by: Cedric Le Goater
    Cc: Eric W. Biederman
    Cc: Herbert Poetzl
    Cc: Sukadev Bhattiprolu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill Korotaev