04 Feb, 2006

3 commits

  • Sometimes it doesn't so make the code more like the version-0 code which
    works.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • - version-1 superblock
    + The default_bitmap_offset is in sectors, not bytes.
    + the 'size' field in the superblock is in sectors, not KB
    - raid0_run should return a negative number on error, not '1'
    - raid10_read_balance should not return a valid 'disk' number if
    ->rdev turned out to be NULL
    - kmem_cache_destroy doesn't like being passed a NULL.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • mdu_array_info_t->size is 'int', which isn't big enough for the size (in KB of
    each component in) some arrays.

    So rather than a random overflow, set size to -1 when it cannot be set
    correctly.

    To update aspect on an array, userspace will sometimes:
    get_array_info
    change one field
    set_array_info

    in this case, we don't want the '-1' in 'size' to change to size, or look like
    a size change at all. So test for that in update_array_info.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

03 Feb, 2006

5 commits

  • This is a fix to the device-mapper-log-bitset-fix-endian patch that
    switched to ext2_* versions of the set and clear bit functions. The
    find_next_zero_bit function also has to be the ext2 one. Otherwise the
    mirror target tries to recover non-existent regions beyond the end of
    device.

    Signed-off-by: Stefan Bader
    Signed-off-by: Alasdair G Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefan Bader
     
  • .. just as we already have for raid5.

    Signed-off-by: Neil Brown
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • While a read-only array doesn't not really need a bitmap, we should
    not remove the bitmap when switching an array to read-only because
    a/ There is no code to re-add the bitmap which switching to read-write,
    b/ There is insufficient locking - the bitmap could be accessed while it is
    being removed.

    Cc: Reuben Farrelly
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • super_1_sync only updates fields in the superblock that might have changed.

    'raid_disks' and 'size' could have changed, but this information doesn't get
    updated.... until this patch.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • As 'array_size' is a 'sector_t', it may overflow inappropriately when shifted
    10 bits. So We should cast it to a loff_t first.

    There are two places with this problem, but the second (in update_raid_disks)
    isn't needed so just remove it:
    The only personality that handles ->reshape currently is raid1,
    and it doesn't change the size of the array.
    When added for raid5/6, reshape again won't change the size of the array,
    at least not straight away.
    This code might be need for reshaping 'linear' but linear->shape,
    if implemented, should probably do the i_size_write itself.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

02 Feb, 2006

7 commits

  • drivers/md/dm-table.c:500: warning: comparison of distinct pointer types lacks a cast

    Signed-off-by: Alasdair G Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alasdair G Kergon
     
  • The snapshot and origin targets are incapable of handling barriers and need to
    indicate this.

    Signed-off-by: Alasdair G Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alasdair G Kergon
     
  • Record I/O timing statistics

    The start time is added to struct dm_io, an existing structure allocated
    privately internally within dm and attached to each incoming bio.

    We export disk_round_stats() from block/ll_rw_blk.c instead of creating a
    private clone.

    Signed-off-by: Jun'ichi "Nick" Nomura
    Signed-off-by: Alasdair G Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jun'ichi "Nick" Nomura
     
  • Record basic I/O statistics for mapped devices.

    Signed-off-by: Kevin Corry
    Signed-off-by: Alasdair G Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kevin Corry
     
  • Reduce substantially the amount of code using PF_MEMALLOC, as envisaged in the
    original FIXME.

    If you're using lvm2, for this patch to work correctly you should update to
    lvm2 version 2.02.01 or later and device-mapper version 1.02.02 or later.

    Signed-off-by: Alasdair G Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alasdair G Kergon
     
  • Clean up the code responsible for the on-disk mirror logs by using the
    set_le_bit test_le_bit functions of ext2. That makes the BE machines keep the
    bitmap internally in LE order - it does mean you can't use any other type of
    operations on the bitmap words but that looks to be OK in this instance. The
    efficiency tradeoff is very minimal as you would expect for something that
    ext2 uses.

    This allows us to remove bits_to_core(), bits_to_disk() and log->disk_bits.

    Also increment the mirror log disk version transparently to avoid sharing with
    older kernels that suffered from the 64-bit BE bug.

    Signed-off-by: Patrick Caulfield
    Signed-off-by: Alasdair G Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Patrick Caulfield
     
  • Move snapshot metadata loading to happen when the table is created instead of
    when the device is resumed. Writes to the origin device don't trigger
    exceptions until each snapshot table becomes active when resume() is called on
    each snapshot.

    If you're using lvm2, for this patch to work properly you should update to
    lvm2 version 2.02.01 or later and device-mapper version 1.02.02 or later.

    Signed-off-by: Alasdair G Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alasdair G Kergon
     

19 Jan, 2006

1 commit

  • EDAC requires a way to scrub memory if an ECC error is found and the chipset
    does not do the work automatically. That means rewriting memory locations
    atomically with respect to all CPUs _and_ bus masters. That means we can't
    use atomic_add(foo, 0) as it gets optimised for non-SMP

    This adds a function to include/asm-foo/atomic.h for the platforms currently
    supported which implements a scrub of a mapped block.

    It also adjusts a few other files include order where atomic.h is included
    before types.h as this now causes an error as atomic_scrub uses u32.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     

17 Jan, 2006

1 commit

  • The 'level' of an md array can be set as either a number of a string. When
    one is set, the other must be marked 'undefined'. This wasn't being done
    in one place: where new arrays are created.

    Result: if md1 is a raid1, it is stopped and a raid5 is created there, it
    might still appear to be a raid1.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

15 Jan, 2006

1 commit


13 Jan, 2006

1 commit


11 Jan, 2006

2 commits

  • DM doesn't need to bounce bio's on its own, but the block layer defaults
    to that in blk_queue_make_request(). The lower level drivers should
    bounce ios themselves, that is what they need to do if not layered below
    dm anyways.

    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     
  • Decrease the number of pointer derefs in drivers/md/multipath.c

    Benefits of the patch:
    - Fewer pointer dereferences should make the code slightly faster.
    - Size of generated code is smaller
    - improved readability

    Signed-off-by: Jesper Juhl
    Acked-by: Ingo Molnar
    Cc: Alasdair G Kergon
    Acked-by: NeilBrown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     

10 Jan, 2006

1 commit


09 Jan, 2006

2 commits

  • Remove various things which were checking for gcc-1.x and gcc-2.x compilers.

    From: Adrian Bunk

    Some documentation updates and removes some code paths for gcc < 3.2.

    Acked-by: Russell King
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • HDIO_GETGEO is implemented in most block drivers, and all of them have to
    duplicate the code to copy the structure to userspace, as well as getting
    the start sector. This patch moves that to common code [1] and adds a
    ->getgeo method to fill out the raw kernel hd_geometry structure. For many
    drivers this means ->ioctl can go away now.

    [1] the s390 block drivers are odd in this respect. xpram sets ->start
    to 4 always which seems more than odd, and the dasd driver shifts
    the start offset around, probably because of it's non-standard
    sector size.

    Signed-off-by: Christoph Hellwig
    Cc: Jens Axboe
    Cc:
    Cc: Jeff Dike
    Cc: Paolo Giarrusso
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Neil Brown
    Cc: Markus Lidel
    Cc: Russell King
    Cc: David Woodhouse
    Cc: Martin Schwidefsky
    Cc: James Bottomley
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

07 Jan, 2006

16 commits