14 Dec, 2006

1 commit

  • Add "relatime" (relative atime) support. Relative atime only updates the
    atime if the previous atime is older than the mtime or ctime. Like
    noatime, but useful for applications like mutt that need to know when a
    file has been read since it was last modified.

    A corresponding patch against mount(8) is available at
    http://userweb.kernel.org/~akpm/mount-relative-atime.txt

    Signed-off-by: Valerie Henson
    Cc: Mark Fasheh
    Cc: Al Viro
    Cc: Christoph Hellwig
    Cc: Karel Zak
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Valerie Henson
     

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
     

08 Dec, 2006

1 commit

  • Replace all uses of kmem_cache_t with struct kmem_cache.

    The patch was generated using the following script:

    #!/bin/sh
    #
    # Replace one string by another in all the kernel sources.
    #

    set -e

    for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
    quilt add $file
    sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
    mv /tmp/$$ $file
    quilt refresh
    done

    The script was run like this

    sh replace kmem_cache_t "struct kmem_cache"

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

02 Oct, 2006

1 commit

  • This moves the mount namespace into the nsproxy. The mount namespace count
    now refers to the number of nsproxies point to it, rather than the number of
    tasks. As a result, the unshare_namespace() function in kernel/fork.c no
    longer checks whether it is being shared.

    Signed-off-by: Serge Hallyn
    Cc: Kirill Korotaev
    Cc: "Eric W. Biederman"
    Cc: Herbert Poetzl
    Cc: Andrey Savochkin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     

01 Oct, 2006

1 commit


30 Sep, 2006

1 commit


26 Sep, 2006

1 commit


01 Jul, 2006

1 commit


27 Jun, 2006

1 commit

  • This patch converts the combination of list_del(A) and list_add(A, B) to
    list_move(A, B).

    Cc: Greg Kroah-Hartman
    Cc: Ram Pai
    Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

25 Jun, 2006

1 commit


23 Jun, 2006

1 commit

  • Extend the get_sb() filesystem operation to take an extra argument that
    permits the VFS to pass in the target vfsmount that defines the mountpoint.

    The filesystem is then required to manually set the superblock and root dentry
    pointers. For most filesystems, this should be done with simple_set_mnt()
    which will set the superblock pointer and then set the root dentry to the
    superblock's s_root (as per the old default behaviour).

    The get_sb() op now returns an integer as there's now no need to return the
    superblock pointer.

    This patch permits a superblock to be implicitly shared amongst several mount
    points, such as can be done with NFS to avoid potential inode aliasing. In
    such a case, simple_set_mnt() would not be called, and instead the mnt_root
    and mnt_sb would be set directly.

    The patch also makes the following changes:

    (*) the get_sb_*() convenience functions in the core kernel now take a vfsmount
    pointer argument and return an integer, so most filesystems have to change
    very little.

    (*) If one of the convenience function is not used, then get_sb() should
    normally call simple_set_mnt() to instantiate the vfsmount. This will
    always return 0, and so can be tail-called from get_sb().

    (*) generic_shutdown_super() now calls shrink_dcache_sb() to clean up the
    dcache upon superblock destruction rather than shrink_dcache_anon().

    This is required because the superblock may now have multiple trees that
    aren't actually bound to s_root, but that still need to be cleaned up. The
    currently called functions assume that the whole tree is rooted at s_root,
    and that anonymous dentries are not the roots of trees which results in
    dentries being left unculled.

    However, with the way NFS superblock sharing are currently set to be
    implemented, these assumptions are violated: the root of the filesystem is
    simply a dummy dentry and inode (the real inode for '/' may well be
    inaccessible), and all the vfsmounts are rooted on anonymous[*] dentries
    with child trees.

    [*] Anonymous until discovered from another tree.

    (*) The documentation has been adjusted, including the additional bit of
    changing ext2_* into foo_* in the documentation.

    [akpm@osdl.org: convert ipath_fs, do other stuff]
    Signed-off-by: David Howells
    Acked-by: Al Viro
    Cc: Nathan Scott
    Cc: Roland Dreier
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

09 Jun, 2006

2 commits


16 May, 2006

1 commit

  • Revert commit f6422f17d3a480f21917a3895e2a46b968f56a08, due to

    Valdis.Kletnieks@vt.edu wrote:
    >
    > There seems to have been a bug introduced in this changeset:
    >
    > Am running 2.6.17-rc3-mm1. When this changeset is applied, 'mount --bind'
    > misbehaves:
    >
    > > # mkdir /foo
    > > # mount -t tmpfs -o rw,nosuid,nodev,noexec,noatime,nodiratime none /foo
    > > # mkdir /foo/bar
    > > # mount --bind /foo/bar /foo
    > > # tail -2 /proc/mounts
    > > none /foo tmpfs rw,nosuid,nodev,noexec,noatime,nodiratime 0 0
    > > none /foo tmpfs rw 0 0
    >
    > Reverting this changeset causes both mounts to have the same options.
    >
    > (Thanks to Stephen Smalley for tracking down the changeset...)
    >

    Cc: Herbert Poetzl
    Cc: Christoph Hellwig
    Cc:
    Cc: Stephen Smalley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

11 Apr, 2006

1 commit


28 Mar, 2006

1 commit


27 Mar, 2006

1 commit

  • I discovered on oprofile hunting on a SMP platform that dentry lookups were
    slowed down because d_hash_mask, d_hash_shift and dentry_hashtable were in
    a cache line that contained inodes_stat. So each time inodes_stats is
    changed by a cpu, other cpus have to refill their cache line.

    This patch moves some variables to the __read_mostly section, in order to
    avoid false sharing. RCU dentry lookups can go full speed.

    Signed-off-by: Eric Dumazet
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     

21 Mar, 2006

1 commit

  • Create a new file under /proc/self, called mountstats, where mounted file
    systems can export information (configuration options, performance counters,
    and so on). Use a mechanism similar to /proc/mounts and s_ops->show_options.

    This mechanism does not violate namespace security, and is safe to use while
    other processes are unmounting file systems.

    Thanks to Mike Waychison for his review and comments.

    Test-plan:
    Test concurrent mount/unmount operations while cat'ing /proc/self/mountstats.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     

16 Mar, 2006

1 commit


08 Feb, 2006

2 commits


17 Jan, 2006

1 commit


12 Jan, 2006

1 commit


11 Jan, 2006

1 commit

  • Turn noatime and nodiratime into per-mount instead of per-sb flags.

    After all the preparations this is a rather trivial patch. The mount code
    needs to treat the two options as per-mount instead of per-superblock, and
    touch_atime needs to be changed to check the new MNT_ flags in addition to
    the MS_ flags that are kept for filesystems that are always
    noatime/nodiratime but not user settable anymore. Besides that core code
    only nfs needed an update because it's leaving atime updates to the server
    and thus sets the S_NOATIME flag on every inode, but needs to know whether
    it's a real noatime mount for an getattr optimization.

    While we're at it I've killed the IS_NOATIME/IS_NODIRATIME macros that were
    only used by touch_atime.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

10 Jan, 2006

1 commit


09 Jan, 2006

2 commits


09 Nov, 2005

1 commit

  • Most permission() calls have a struct nameidata * available. This helper
    takes that as an argument and thus makes sure we pass it down for lookup
    intents and prepares for per-mount read-only support where we need a struct
    vfsmount for checking whether a file is writeable.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

08 Nov, 2005

12 commits

  • An unbindable mount does not forward or receive propagation. Also
    unbindable mount disallows bind mounts. The semantics is as follows.

    Bind semantics:
    It is invalid to bind mount an unbindable mount.

    Move semantics:
    It is invalid to move an unbindable mount under shared mount.

    Clone-namespace semantics:
    If a mount is unbindable in the parent namespace, the corresponding
    cloned mount in the child namespace becomes unbindable too. Note:
    there is subtle difference, unbindable mounts cannot be bind mounted
    but can be cloned during clone-namespace.

    Signed-off-by: Ram Pai
    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Ram Pai
     
  • This makes bind, rbind, move, clone namespace and umount operations
    aware of the semantics of slave mount (see Documentation/sharedsubtree.txt
    in the last patch of the series for detailed description).

    Signed-off-by: Ram Pai
    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Ram Pai
     
  • A slave mount always has a master mount from which it receives
    mount/umount events. Unlike shared mount the event propagation does not
    flow from the slave mount to the master.

    Signed-off-by: Ram Pai
    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Ram Pai
     
  • An unmount of a mount creates a umount event on the parent. If the
    parent is a shared mount, it gets propagated to all mounts in the peer
    group.

    Signed-off-by: Ram Pai
    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Ram Pai
     
  • Implement handling of mount --move in presense of shared mounts (see
    Documentation/sharedsubtree.txt in the end of patch series for detailed
    description).

    Signed-off-by: Ram Pai
    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Ram Pai
     
  • Implement handling of MS_BIND in presense of shared mounts (see
    Documentation/sharedsubtree.txt in the end of patch series for detailed
    description).

    Signed-off-by: Ram Pai
    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Ram Pai
     
  • This creates shared mounts. A shared mount when bind-mounted to some
    mountpoint, propagates mount/umount events to each other. All the
    shared mounts that propagate events to each other belong to the same
    peer-group.

    Signed-off-by: Ram Pai
    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Ram Pai
     
  • A private mount does not forward or receive propagation. This patch
    provides user the ability to convert any mount to private.

    Signed-off-by: Ram Pai
    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Ram Pai
     
  • This removes the per-namespace semaphore in favor of a global semaphore.
    This can have an effect on namespace scalability.

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

    Ram Pai
     
  • - clean up the ugliness in may_umount_tree()

    - fix a bug in do_loopback(). after cloning a tree, do_loopback()
    unlinks only the topmost mount of the cloned tree, leaving behind the
    children mounts on their corresponding expiry list.

    Signed-off-by: Ram Pai
    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Ram Pai
     
  • umount is done under the protection of the namespace semaphore. This
    can lead to intresting deadlocks when the last reference to a mount is
    released, if filesystem code is in sufficiently nasty state.

    This collects all the to-be-released-mounts and releases them after
    releasing the namespace semaphore. That both reduces the time we are
    holding namespace semaphore and gets the things more robust.

    Idea proposed by Al Viro.

    Signed-off-by: Ram Pai
    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Ram Pai
     
  • Old semantics: graft_tree() grabs a reference on the vfsmount before
    returning success.

    New one: graft_tree() leaves that to caller.

    All the callers of graft_tree() immediately dropped that reference
    anyway. Changing the interface takes care of this unnecessary overhead.

    Idea proposed by Al Viro.

    Signed-off-by: Ram Pai
    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Ram Pai