19 Jun, 2009

1 commit

  • Follow-up to "block: enable by default support for large devices
    and files on 32-bit archs".

    Rename CONFIG_LBD to CONFIG_LBDAF to:
    - allow update of existing [def]configs for "default y" change
    - reflect that it is used also for large files support nowadays

    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Jens Axboe

    Bartlomiej Zolnierkiewicz
     

12 Jun, 2009

1 commit


20 Oct, 2008

1 commit

  • When trying to resize a ext3 fs and you run out of reserved gdt blocks,
    you get an error that doesn't actually tell you what went wrong, it just
    says that the gdb it picked is not correct, which is the case since you
    don't have any reserved gdt blocks left. This patch adds a check to make
    sure you have reserved gdt blocks to use, and if not prints out a more
    relevant error.

    Signed-off-by: Josef Bacik
    Cc:
    Cc: Andreas Dilger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josef Bacik
     

07 Jun, 2008

1 commit

  • There is a bug when we are trying to verify that the reserve inode's
    double indirect blocks point back to the primary gdt blocks. The fix is
    obvious, we need to mod the gdb count by the addr's per block. You can
    verify this with the following test case

    dd if=/dev/zero of=disk1 seek=1024 count=1 bs=100M
    losetup /dev/loop1 disk1
    pvcreate /dev/loop1
    vgcreate loopvg1 /dev/loop1
    lvcreate -l 100%VG loopvg1 -n looplv1
    mkfs.ext3 -J size=64 -b 1024 /dev/loopvg1/looplv1
    mount /dev/loopvg1/looplv1 /mnt/loop
    dd if=/dev/zero of=disk2 seek=1024 count=1 bs=50M
    losetup /dev/loop2 disk2
    pvcreate /dev/loop2
    vgextend loopvg1 /dev/loop2
    lvextend -l 100%VG /dev/loopvg1/looplv1
    resize2fs /dev/loopvg1/looplv1

    without this patch the resize2fs fails, with it the resize2fs succeeds.

    Signed-off-by: Josef Bacik
    Acked-by: Andreas Dilger
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josef Bacik
     

28 Apr, 2008

2 commits


20 Mar, 2008

1 commit

  • There are several places where we make allocations with GFP_KERNEL while under
    a transaction, which could lead to an assertion panic or lockup if under
    memory pressure. This patch switches these problem areas to use GFP_NOFS to
    keep these problems from happening.

    Signed-off-by: Josef Bacik
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josef Bacik
     

09 Feb, 2008

1 commit

  • replace all:
    little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) +
    expression_in_cpu_byteorder);
    with:
    leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder);
    sparse didn't generate any new warning with this patch

    Signed-off-by: Marcin Slusarz
    Cc: Mark Fasheh
    Cc: David Chinner
    Cc: Timothy Shimmin
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Slusarz
     

08 Feb, 2008

1 commit

  • Stop the EXT3 filesystem from using iget() and read_inode(). Replace
    ext3_read_inode() with ext3_iget(), and call that instead of iget().
    ext3_iget() then uses iget_locked() directly and returns a proper error code
    instead of an inode in the event of an error.

    ext3_fill_super() returns any error incurred when getting the root inode
    instead of EINVAL.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: David Howells
    Acked-by: "Theodore Ts'o"
    Acked-by: Jan Kara
    Cc:
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

19 Oct, 2007

1 commit

  • setup_new_group_blocks() manipulates the group descriptor block bh under
    the block_bitmap bh's lock. It shouldn't matter since nobody but resize
    should be touching these blocks, but it's worth fixing up.

    Signed-off-by: Eric Sandeen
    C:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sandeen
     

17 Oct, 2007

2 commits

  • When resizing online, setup_new_group_blocks attempts to reserve a
    potentially very large transaction, depending on the current filesystem
    geometry. For some journal sizes, there may not be enough room for this
    transaction, and the online resize will fail.

    The patch below resizes & restarts the transaction as necessary while
    setting up the new group, and should work with even the smallest journal.

    Tested with something like:

    [root@newbox ~]# dd if=/dev/zero of=fsfile bs=1024 count=32768
    [root@newbox ~]# mkfs.ext3 -b 1024 fsfile 16384
    [root@newbox ~]# mount -o loop fsfile mnt/
    [root@newbox ~]# resize2fs /dev/loop0
    resize2fs 1.40.2 (12-Jul-2007)
    Filesystem at /dev/loop0 is mounted on /root/mnt; on-line resizing required
    old desc_blocks = 1, new_desc_blocks = 1
    Performing an on-line resize of /dev/loop0 to 32768 (1k) blocks.
    resize2fs: No space left on device While trying to add group #2
    [root@newbox ~]# dmesg | tail -n 1
    JBD: resize2fs wants too many credits (258 > 256)
    [root@newbox ~]#

    With the below change, it works.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Eric Sandeen
    Acked-by: Andreas Dilger
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sandeen
     
  • s/percpu_counter_mod/percpu_counter_add/

    Because its a better name, _mod implies modulo.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

09 May, 2007

1 commit


15 Feb, 2007

1 commit

  • After Al Viro (finally) succeeded in removing the sched.h #include in module.h
    recently, it makes sense again to remove other superfluous sched.h includes.
    There are quite a lot of files which include it but don't actually need
    anything defined in there. Presumably these includes were once needed for
    macros that used to live in sched.h, but moved to other header files in the
    course of cleaning it up.

    To ease the pain, this time I did not fiddle with any header files and only
    removed #includes from .c-files, which tend to cause less trouble.

    Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
    arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
    allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
    configs in arch/arm/configs on arm. I also checked that no new warnings were
    introduced by the patch (actually, some warnings are removed that were emitted
    by unnecessarily included header files).

    Signed-off-by: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

27 Sep, 2006

3 commits

  • * Removing useless casts
    * Removing useless wrapper
    * Conversion from kmalloc+memset to kzalloc

    Signed-off-by: Panagiotis Issaris
    Acked-by: Dave Kleikamp
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Panagiotis Issaris
     
  • Some of the changes in balloc.c are just cosmetic, as Andreas pointed out -
    if they overflow they'll then underflow and things are fine.

    5th hunk actually fixes an overflow problem.

    Also check for potential overflows in inode & block counts when resizing.

    Signed-off-by: Eric Sandeen
    Cc: Mingming Cao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sandeen
     
  • Fixing up some endian-ness warnings in preparation to clone ext4 from ext3.

    Signed-off-by: Dave Kleikamp
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Kleikamp
     

01 Jul, 2006

1 commit


26 Jun, 2006

3 commits

  • Convert the ext3 in-kernel filesystem blocks to ext3_fsblk_t. Convert the
    rest of all unsigned long type in-kernel filesystem blocks to ext3_fsblk_t,
    and replace the printk format string respondingly.

    Signed-off-by: Mingming Cao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mingming Cao
     
  • Some of the in-kernel ext3 block variable type are treated as signed 4 bytes
    int type, thus limited ext3 filesystem to 8TB (4kblock size based). While
    trying to fix them, it seems quite confusing in the ext3 code where some
    blocks are filesystem-wide blocks, some are group relative offsets that need
    to be signed value (as -1 has special meaning). So it seem saner to define
    two types of physical blocks: one is filesystem wide blocks, another is
    group-relative blocks. The following patches clarify these two types of
    blocks in the ext3 code, and fix the type bugs which limit current 32 bit ext3
    filesystem limit to 8TB.

    With this series of patches and the percpu counter data type changes in the mm
    tree, we are able to extend exts filesystem limit to 16TB.

    This work is also a pre-request for the recent >32 bit ext3 work, and makes
    the kernel to able to address 48 bit ext3 block a lot easier: Simply redefine
    ext3_fsblk_t from unsigned long to sector_t and redefine the format string for
    ext3 filesystem block corresponding.

    Two RFC with a series patches have been posted to ext2-devel list and have
    been reviewed and discussed:
    http://marc.theaimsgroup.com/?l=ext2-devel&m=114722190816690&w=2

    http://marc.theaimsgroup.com/?l=ext2-devel&m=114784919525942&w=2

    Patches are tested on both 32 bit machine and 64 bit machine, 8TB ext3 filesystem(with the latest to be released e2fsprogs-1.39). Tests
    includes overnight fsx, tiobench, dbench and fsstress.

    This patch:

    Defines ext3_fsblk_t and ext3_grpblk_t, and the printk format string for
    filesystem wide blocks.

    This patch classifies all block group relative blocks, and ext3_fsblk_t blocks
    occurs in the same function where used to be confusing before. Also include
    kernel bug fixes for filesystem wide in-kernel block variables. There are
    some fileystem wide blocks are treated as int/unsigned int type in the kernel
    currently, especially in ext3 block allocation and reservation code. This
    patch fixed those bugs by converting those variables to ext3_fsblk_t(unsigned
    long) type.

    Signed-off-by: Mingming Cao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mingming Cao
     
  • If ext3 filesystem is larger than 2TB, and sector_t is a u32 (i.e.
    CONFIG_LBD not defined in the kernel), the calculation of the disk sector
    will overflow. Add check at ext3_fill_super() and ext3_group_extend() to
    prevent mount/remount/resize >2TB ext3 filesystem if sector_t size is 4
    bytes.

    Verified this patch on a 32 bit platform without CONFIG_LBD defined
    (sector_t is 32 bits long), mount refuse to mount a 10TB ext3.

    Signed-off-by: Mingming Cao
    Acked-by: Andreas Dilger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mingming Cao
     

01 Jun, 2006

1 commit


26 Apr, 2006

1 commit

  • sbi->s_group_desc is an array of pointers to buffer_head. memcpy() of
    buffer size from address of buffer_head is a bad idea - it will generate
    junk in any case, may oops if buffer_head is close to the end of slab
    page and next page is not mapped and isn't what was intended there.
    IOW, ->b_data is missing in that call. Fortunately, result doesn't go
    into the primary on-disk data structures, so only backup ones get crap
    written to them; that had allowed this bug to remain unnoticed until
    now.

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

    Al Viro
     

18 Apr, 2006

1 commit


11 Apr, 2006

1 commit


09 Jan, 2006

2 commits


29 Nov, 2005

1 commit

  • This patch corrects the return value for the EXT3_IOC_GROUP_ADD in case it
    fails due to the presence of multiple resizers at the filesystem.

    The problem is a little bit more serious than a wrong return value in this
    case, since the clause err=0 in the exit_journal path will lead to a call
    to update_backups which in turns causes a NULL pointer dereference.

    Signed-off-by: Glauber de Oliveira Costa
    Cc: "Stephen C. Tweedie"
    Cc: Andreas Dilger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Glauber de Oliveira Costa
     

31 Oct, 2005

1 commit

  • This patch adds tests for the return value of sb_getblk() in the ext2/3
    filesystems. In fs/buffer.c it is stated that the getblk() function never
    fails. However, it does can return NULL in some situations due to I/O
    errors, which may lead us to NULL pointer dereferences

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Glauber de Oliveira Costa
     

23 Sep, 2005

1 commit


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