1. 24 Feb, 2011 5 commits
    • Coly Li's avatar
      ext4: mballoc: don't replace the current preallocation group unnecessarily · 5a54b2f1
      Coly Li authored
      In ext4_mb_check_group_pa(), the current preallocation space is
      replaced with a new preallocation space when the two have the same
      distance from the goal block.
      
      This doesn't actually gain us anything, so change things so that the
      function only switches to the new preallocation group if its distance
      from the goal block is strictly smaller than the current preallocaiton
      group's distance from the goal block.
      Signed-off-by: default avatarColy Li <bosong.ly@taobao.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      5a54b2f1
    • Coly Li's avatar
      ext4: clarify description of ac_g_ex in struct ext4_allocation_context · 58696f3a
      Coly Li authored
      Signed-off-by: default avatarColy Li <bosong.ly@taobao.com>
      Cc: Alex Tomas <alex@clusterfs.com>
      Cc: Theodore Tso <tytso@google.com>
      58696f3a
    • Coly Li's avatar
      mballoc: add comments to ext4_mb_mark_free_simple() · 7c786059
      Coly Li authored
      This patch adds comments to ext4_mb_mark_free_simple to make it more
      understandable.
      Signed-off-by: default avatarColy Li <bosong.ly@taobao.com>
      Cc: Alex Tomas <alex@clusterfs.com>
      Cc: Theodore Tso <tytso@google.com>
      7c786059
    • Coly Li's avatar
      ext4: remove unncessary call mb_find_buddy() in debugging code · 235772da
      Coly Li authored
      In __mb_check_buddy(), look at the code below:
        591         fstart = -1;
        592         buddy = mb_find_buddy(e4b, 0, &max);
        593         for (i = 0; i < max; i++) {
        594                 if (!mb_test_bit(i, buddy)) {
        595                         MB_CHECK_ASSERT(i >= e4b->bd_info->bb_first_free);
        596                         if (fstart == -1) {
        597                                 fragments++;
        598                                 fstart = i;
        599                         }
        600                         continue;
        601                 }
        602                 fstart = -1;
        603                 /* check used bits only */
        604                 for (j = 0; j < e4b->bd_blkbits + 1; j++) {
        605                         buddy2 = mb_find_buddy(e4b, j, &max2);
        606                         k = i >> j;
        607                         MB_CHECK_ASSERT(k < max2);
        608                         MB_CHECK_ASSERT(mb_test_bit(k, buddy2));
        609                 }
        610         }
        611         MB_CHECK_ASSERT(!EXT4_MB_GRP_NEED_INIT(e4b->bd_info));
        612         MB_CHECK_ASSERT(e4b->bd_info->bb_fragments == fragments);
        613
        614         grp = ext4_get_group_info(sb, e4b->bd_group);
        615         buddy = mb_find_buddy(e4b, 0, &max);
      
      On line 592, buddy is fetched by mb_find_buddy() with order 0, between
      line 593 to line 615, buddy is not changed, therefore there is
      no need to fetch buddy again from mb_find_buddy() with order 0 again.
      
      We can safely remove the second mb_find_buddy() on line 615.
      Signed-off-by: default avatarColy Li <bosong.ly@taobao.com>
      Cc: Alex Tomas <alex@clusterfs.com>
      Cc: Theodore Tso <tytso@google.com>
      235772da
    • Coly Li's avatar
      ext4: code cleanup in mb_find_buddy() · 84b775a3
      Coly Li authored
      Current code calculate max no matter whether order is zero, it's
      unnecessary. This cleanup patch sets max to "1 << (e4b->bd_blkbits
      + 3)" only when order == 0.
      Signed-off-by: default avatarColy Li <bosong.ly@taobao.com>
      Cc: Alex Tomas <alex@clusterfs.com>
      Cc: Theodore Tso <tytso@google.com>
      84b775a3
  2. 23 Feb, 2011 4 commits
  3. 22 Feb, 2011 4 commits
  4. 16 Feb, 2011 3 commits
    • Linus Torvalds's avatar
      vfs: fix BUG_ON() in fs/namei.c:1461 · 3abb17e8
      Linus Torvalds authored
      When Al moved the nameidata_dentry_drop_rcu_maybe() call into the
      do_follow_link function in commit 844a3917 ("nothing in
      do_follow_link() is going to see RCU"), he mistakenly left the
      
      	BUG_ON(inode != path->dentry->d_inode);
      
      behind.  Which would otherwise be ok, but that BUG_ON() really needs to
      be _after_ dropping RCU, since the dentry isn't necessarily stable
      otherwise.
      
      So complete the code movement in that commit, and move the BUG_ON() into
      do_follow_link() too.  This means that we need to pass in 'inode' as an
      argument (just for this one use), but that's a small thing.  And
      eventually we may be confident enough in our path lookup that we can
      just remove the BUG_ON() and the unnecessary inode argument.
      Reported-and-tested-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3abb17e8
    • Linus Torvalds's avatar
      Linux 2.6.38-rc5 · 85e2efbb
      Linus Torvalds authored
      85e2efbb
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · 048f039f
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68knommu: set flow handler for secondary interrupt controller of 5249
        m68knommu: remove use of IRQ_FLG_LOCK from 68360 platform support
        m68knommu: fix dereference of port.tty
        m68knommu: add missing linker __modver section
        m68knommu: fix mis-named variable int set_irq_chip loop
        m68knommu: add optimize memmove() function
        m68k: remove arch specific non-optimized memcmp()
        m68knommu: fix use of un-defined _TIF_WORK_MASK
        m68knommu: Rename m548x_wdt.c to m54xx_wdt.c
        m68knommu: fix m548x_wdt.c compilation after headers renaming
        m68knommu: Remove dependencies on nonexistent M68KNOMMU
      048f039f
  5. 15 Feb, 2011 24 commits