12 Jun, 2009

10 commits

  • [folded fix from Jiri Slaby]

    Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • d_unlinked() will be used in middle-term to ban checkpointing when opened
    but unlinked file is detected, and in long term, to detect such situation
    and special case on it.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Al Viro

    Alexey Dobriyan
     
  • This patch speeds up lmbench lat_mmap test by about another 2% after the
    first patch.

    Before:
    avg = 462.286
    std = 5.46106

    After:
    avg = 453.12
    std = 9.58257

    (50 runs of each, stddev gives a reasonable confidence)

    It does this by introducing mnt_clone_write, which avoids some heavyweight
    operations of mnt_want_write if called on a vfsmount which we know already
    has a write count; and mnt_want_write_file, which can call mnt_clone_write
    if the file is open for write.

    After these two patches, mnt_want_write and mnt_drop_write go from 7% on
    the profile down to 1.3% (including mnt_clone_write).

    [AV: mnt_want_write_file() should take file alone and derive mnt from it;
    not only all callers have that form, but that's the only mnt about which
    we know that it's already held for write if file is opened for write]

    Cc: Dave Hansen
    Signed-off-by: Nick Piggin
    Signed-off-by: Al Viro

    npiggin@suse.de
     
  • This patch speeds up lmbench lat_mmap test by about 8%. lat_mmap is set up
    basically to mmap a 64MB file on tmpfs, fault in its pages, then unmap it.
    A microbenchmark yes, but it exercises some important paths in the mm.

    Before:
    avg = 501.9
    std = 14.7773

    After:
    avg = 462.286
    std = 5.46106

    (50 runs of each, stddev gives a reasonable confidence, but there is quite
    a bit of variation there still)

    It does this by removing the complex per-cpu locking and counter-cache and
    replaces it with a percpu counter in struct vfsmount. This makes the code
    much simpler, and avoids spinlocks (although the msync is still pretty
    costly, unfortunately). It results in about 900 bytes smaller code too. It
    does increase the size of a vfsmount, however.

    It should also give a speedup on large systems if CPUs are frequently operating
    on different mounts (because the existing scheme has to operate on an atomic in
    the struct vfsmount when switching between mounts). But I'm most interested in
    the single threaded path performance for the moment.

    [AV: minor cleanup]

    Cc: Dave Hansen
    Signed-off-by: Nick Piggin
    Signed-off-by: Al Viro

    npiggin@suse.de
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • These guys are what we add as submounts; checks for "is that attached in
    our namespace" are simply irrelevant for those and counterproductive for
    use of private vfsmount trees a-la what NFS folks want.

    Signed-off-by: Al Viro

    Al Viro
     

09 May, 2009

2 commits


21 Apr, 2009

1 commit


20 Apr, 2009

1 commit

  • Since commit 0a1c01c9477602ee8b44548a9405b2c1d587b5a2 ("Make relatime
    default") when a file system is mounted explicitely with noatime it gets
    both the MNT_RELATIME and MNT_NOATIME bits set.

    This shows up like this in /proc/mounts:

    /dev/xxx /yyy ext3 rw,noatime,relatime,errors=continue,data=writeback 0 0

    That looks strange. The VFS uses noatime in this case, but both flags
    are set. So it's more a cosmetic issue, but still better to fix.

    Cc: mjg@redhat.com
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

01 Apr, 2009

3 commits


28 Mar, 2009

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (37 commits)
    fs: avoid I_NEW inodes
    Merge code for single and multiple-instance mounts
    Remove get_init_pts_sb()
    Move common mknod_ptmx() calls into caller
    Parse mount options just once and copy them to super block
    Unroll essentials of do_remount_sb() into devpts
    vfs: simple_set_mnt() should return void
    fs: move bdev code out of buffer.c
    constify dentry_operations: rest
    constify dentry_operations: configfs
    constify dentry_operations: sysfs
    constify dentry_operations: JFS
    constify dentry_operations: OCFS2
    constify dentry_operations: GFS2
    constify dentry_operations: FAT
    constify dentry_operations: FUSE
    constify dentry_operations: procfs
    constify dentry_operations: ecryptfs
    constify dentry_operations: CIFS
    constify dentry_operations: AFS
    ...

    Linus Torvalds
     
  • simple_set_mnt() is defined as returning 'int' but always returns 0.
    Callers assume simple_set_mnt() never fails and don't properly cleanup if
    it were to _ever_ fail. For instance, get_sb_single() and get_sb_nodev()
    should:

    up_write(sb->s_unmount);
    deactivate_super(sb);

    if simple_set_mnt() fails.

    Since simple_set_mnt() never fails, would be cleaner if it did not
    return anything.

    [akpm@linux-foundation.org: fix build]
    Signed-off-by: Sukadev Bhattiprolu
    Acked-by: Serge Hallyn
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Al Viro

    Sukadev Bhattiprolu
     

27 Mar, 2009

2 commits

  • Change the default behaviour of the kernel to use relatime for all
    filesystems. This can be overridden with the "strictatime" mount
    option.

    Signed-off-by: Matthew Garrett
    Signed-off-by: Linus Torvalds

    Matthew Garrett
     
  • Add support for explicitly requesting full atime updates. This makes it
    possible for kernels to default to relatime but still allow userspace to
    override it.

    Signed-off-by: Matthew Garrett
    Signed-off-by: Linus Torvalds

    Matthew Garrett
     

18 Feb, 2009

1 commit

  • Getting this wrong caused

    WARNING: at fs/namespace.c:636 mntput_no_expire+0xac/0xf2()

    due to optimistically checking cpu_writer->mnt outside the spinlock.

    Here's what we really want:
    * we know that nobody will set cpu_writer->mnt to mnt from now on
    * all changes to that sucker are done under cpu_writer->lock
    * we want the laziest equivalent of
    spin_lock(&cpu_writer->lock);
    if (likely(cpu_writer->mnt != mnt)) {
    spin_unlock(&cpu_writer->lock);
    continue;
    }
    /* do stuff */
    that would make sure we won't miss earlier setting of ->mnt done by
    another CPU.

    Anyway, for now we just move the spin_lock() earlier and move the test
    into the properly locked region.

    Signed-off-by: Al Viro
    Reported-and-tested-by: Li Zefan
    Signed-off-by: Linus Torvalds

    Al Viro
     

14 Jan, 2009

2 commits


01 Jan, 2009

1 commit


14 Nov, 2008

2 commits

  • Conflicts:
    security/keys/internal.h
    security/keys/process_keys.c
    security/keys/request_key.c

    Fixed conflicts above by using the non 'tsk' versions.

    Signed-off-by: James Morris

    James Morris
     
  • Wrap access to task credentials so that they can be separated more easily from
    the task_struct during the introduction of COW creds.

    Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().

    Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more
    sense to use RCU directly rather than a convenient wrapper; these will be
    addressed by later patches.

    Signed-off-by: David Howells
    Reviewed-by: James Morris
    Acked-by: Serge Hallyn
    Cc: Al Viro
    Signed-off-by: James Morris

    David Howells
     

13 Nov, 2008

1 commit

  • In the last refactoring of shrink_submounts a variable was not completely
    renamed. So finish the renaming of mnt to m now.

    Without this if you attempt to mount an nfs mount that has both automatic
    nfs sub mounts on it, and has normal mounts on it. The unmount will
    succeed when it should not.

    Signed-off-by: Eric W. Biederman
    Cc: Alexey Dobriyan
    Cc: Al Viro
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

23 Oct, 2008

3 commits


01 Aug, 2008

1 commit


27 Jul, 2008

4 commits


14 Jul, 2008

1 commit

  • This patch causes SELinux mount options to show up in /proc/mounts. As
    with other code in the area seq_put errors are ignored. Other LSM's
    will not have their mount options displayed until they fill in their own
    security_sb_show_options() function.

    Signed-off-by: Eric Paris
    Signed-off-by: Miklos Szeredi
    Signed-off-by: James Morris

    Eric Paris
     

30 Apr, 2008

1 commit


29 Apr, 2008

1 commit

  • Remove lives_below_in_same_fs() since is_subdir() from fs/dcache.c is
    providing the same functionality.

    Signed-off-by: Jan Blunck
    Acked-by: Miklos Szeredi
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     

28 Apr, 2008

1 commit