22 May, 2010

1 commit

  • Add a spinlock that protects against concurrent modifications of
    s_mount_state, s_blocks_last, s_overhead_last and the content of the
    superblock's buffer pointed to by sbi->s_es. The spinlock is now used in
    ext2_xattr_update_super_block() which was setting the
    EXT2_FEATURE_COMPAT_EXT_ATTR flag on the superblock without protection
    before. Likewise the spinlock is used in ext2_show_options() to have a
    consistent view of the mount options.

    This is a preparation patch for removing the BKL from ext2 in the next
    patch.

    Signed-off-by: Jan Blunck
    Cc: Andi Kleen
    Cc: Jan Kara
    Cc: OGAWA Hirofumi
    Signed-off-by: Jan Kara

    Jan Blunck
     

09 Jan, 2009

1 commit

  • As spotted by kmemtrace, struct ext2_sb_info is 17024 bytes on 64-bit
    which makes it a very bad fit for SLAB allocators. The culprit of the
    wasted memory is ->s_blockgroup_lock which can be as big as 16 KB when
    NR_CPUS >= 32.

    To fix that, allocate ->s_blockgroup_lock, which fits nicely in a order 2
    page in the worst case, separately. This shinks down struct ext2_sb_info
    enough to fit a 1 KB slab cache so now we allocate 16 KB + 1 KB instead of
    32 KB saving 15 KB of memory.

    Acked-by: Andreas Dilger
    Signed-off-by: Pekka Enberg
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka J Enberg
     

05 Jan, 2009

1 commit

  • As suggested by Andreas Dilger, introduce a bgl_lock_ptr() helper in
    and add separate sb_bgl_lock() helpers to
    filesystem specific header files to break the hidden dependency to
    struct ext[234]_sb_info.

    Also, while at it, convert the macros to static inlines to try make up
    for all the times I broke Andrew Morton's tree.

    Acked-by: Andreas Dilger
    Signed-off-by: Pekka Enberg
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka Enberg
     

17 Oct, 2007

2 commits

  • Val's cross-port of the ext3 reservations code into ext2.

    [mbligh@mbligh.org: Small type error for printk
    [akpm@linux-foundation.org: fix types, sync with ext3]
    [mbligh@mbligh.org: Bring ext2 reservations code in line with latest ext3]
    [akpm@linux-foundation.org: kill noisy printk]
    [akpm@linux-foundation.org: remember to dirty the gdp's block]
    [akpm@linux-foundation.org: cross-port the missed 5dea5176e5c32ef9f0d1a41d28427b3bf6881b3a]
    [akpm@linux-foundation.org: cross-port e6022603b9aa7d61d20b392e69edcdbbc1789969]
    [akpm@linux-foundation.org: Port the omitted 08fb306fe63d98eb86e3b16f4cc21816fa47f18e]
    [akpm@linux-foundation.org: Backport the missed 20acaa18d0c002fec180956f87adeb3f11f635a6]
    [akpm@linux-foundation.org: fixes]
    [cmm@us.ibm.com: fix reservation extension]
    [bunk@stusta.de: make ext2_get_blocks() static]
    [hugh@veritas.com: fix hang]
    [hugh@veritas.com: ext2_new_blocks should reset the reservation window size]
    [hugh@veritas.com: ext2 balloc: fix off-by-one against rsv_end]
    [hugh@veritas.com: grp_goal 0 is a genuine goal (unlike -1), so ext2_try_to_allocate_with_rsv should treat it as such]
    [hugh@veritas.com: rbtree usage cleanup]
    [pbadari@us.ibm.com: Fix for ext2 reservation]
    [bunk@kernel.org: remove fs/ext2/balloc.c:reserve_blocks()]
    [hugh@veritas.com: ext2 balloc: use io_error label]
    Cc: "Martin J. Bligh"
    Cc: Valerie Henson
    Cc: Mingming Cao
    Cc: Mel Gorman
    Cc: Hugh Dickins
    Signed-off-by: Adrian Bunk
    Signed-off-by: Hugh Dickins
    Signed-off-by: Badari Pulavarty
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Martin J. Bligh
     
  • Using mtab is problematic for various reasons, one of them is that
    unprivileged mounts won't turn up in there. So we want to get rid of it, and
    use /proc/mounts instead.

    But most filesystems are lazy, and are not showing all mount options. Which
    means, that without mtab, the user won't be able to see some or all of the
    options.

    It would be nice if the generic code could remember the mount options, and
    show them without the need to add extra code to filesystems. But this is not
    easy, because different filesystems handle mount options given options, and
    not tough the rest. This is not taken into account by mount(8) either, so
    /etc/mtab will be broken in this case.

    This series fixes up ->show_options() in ext[234].

    Signed-off-by: Miklos Szeredi
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     

17 Jul, 2007

1 commit

  • This is a patch that speeds up statfs. It is very simple - the "overhead"
    calculation, which takes a huge amount of time for large filesystems, never
    changes unless the size of the filesystem itself changes. That means we can
    store it in memory and only recalculate if the filesystem has been resized
    (almost never).

    It also fixes a minor problem that we never update the on-disk superblock free
    blocks/inodes counts until the filesystem is unmounted. While not fatal, we
    may as well update that on disk when we have the information, and it makes
    things like debugfs and dumpe2fs report a bit more accurate info.

    Signed-off-by: Badari Pulavarty
    Signed-off-by: Andreas Dilger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Badari Pulavarty
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds