02 Aug, 2011

3 commits


29 May, 2011

1 commit

  • Replace the arbitrary calculation of an initial io struct mempool size
    with a constant.

    The code calculated the number of reserved structures based on the request
    size and used a "magic" multiplication constant of 4. This patch changes
    it to reserve a fixed number - itself still chosen quite arbitrarily.
    Further testing might show if there is a better number to choose.

    Note that if there is no memory pressure, we can still allocate an
    arbitrary number of "struct io" structures. One structure is enough to
    process the whole request.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     

26 Mar, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm:
    dm stripe: implement merge method
    dm mpath: allow table load with no priority groups
    dm mpath: fail message ioctl if specified path is not valid
    dm ioctl: add flag to wipe buffers for secure data
    dm ioctl: prepare for crypt key wiping
    dm crypt: wipe keys string immediately after key is set
    dm: add flakey target
    dm: fix opening log and cow devices for read only tables

    Linus Torvalds
     

24 Mar, 2011

2 commits

  • If a table is read-only, also open any log and cow devices it uses read-only.

    Previously, even read-only devices were opened read-write internally.
    After patch 75f1dc0d076d1c1168f2115f1941ea627d38bd5a
    block: check bdev_read_only() from blkdev_get()
    was applied, loading such tables began to fail. The patch
    was reverted by e51900f7d38cbcfb481d84567fd92540e7e1d23a
    block: revert block_dev read-only check
    but this patch fixes this part of the code to work with the original patch.

    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • As a preparation for removing ext2 non-atomic bit operations from
    asm/bitops.h. This converts ext2 non-atomic bit operations to
    little-endian bit operations.

    Signed-off-by: Akinobu Mita
    Cc: Alasdair Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

14 Jan, 2011

1 commit

  • It's nicer to return the PTR_ERR() value instead of just returning
    -ENOMEM. In the current code the PTR_ERR() value is always equal to
    -ENOMEM so this doesn't actually affect anything, but still...

    In addition, dm_dirty_log_create() doesn't check for a specific -ENOMEM
    return. So this change is safe relative to potential for a non -ENOMEM
    return in the future.

    Signed-off-by: Dan Carpenter
    Acked-by: Jonathan Brassow
    Signed-off-by: Mike Snitzer
    Signed-off-by: Alasdair G Kergon

    Dan Carpenter
     

10 Sep, 2010

1 commit

  • This patch converts bio-based dm to support REQ_FLUSH/FUA instead of
    now deprecated REQ_HARDBARRIER.

    * -EOPNOTSUPP handling logic dropped.

    * Preflush is handled as before but postflush is dropped and replaced
    with passing down REQ_FUA to member request_queues. This replaces
    one array wide cache flush w/ member specific FUA writes.

    * __split_and_process_bio() now calls __clone_and_map_flush() directly
    for flushes and guarantees all FLUSH bio's going to targets are zero
    ` length.

    * It's now guaranteed that all FLUSH bio's which are passed onto dm
    targets are zero length. bio_empty_barrier() tests are replaced
    with REQ_FLUSH tests.

    * Empty WRITE_BARRIERs are replaced with WRITE_FLUSHes.

    * Dropped unlikely() around REQ_FLUSH tests. Flushes are not unlikely
    enough to be marked with unlikely().

    * Block layer now filters out REQ_FLUSH/FUA bio's if the request_queue
    doesn't support cache flushing. Advertise REQ_FLUSH | REQ_FUA
    capability.

    * Request based dm isn't converted yet. dm_init_request_based_queue()
    resets flush support to 0 for now. To avoid disturbing request
    based dm code, dm->flush_error is added for bio based dm while
    requested based dm continues to use dm->barrier_error.

    Lightly tested linear, stripe, raid1, snap and crypt targets. Please
    proceed with caution as I'm not familiar with the code base.

    Signed-off-by: Tejun Heo
    Cc: dm-devel@redhat.com
    Cc: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Tejun Heo
     

06 Mar, 2010

1 commit


11 Dec, 2009

6 commits

  • Report flush errors as 'F' instead of 'D' for log and mirror devices.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Call the flush callback from the log.

    If flush failed, we have no alternative but to mark the whole log as dirty.
    Also we set the variable flush_failed to prevent any bits ever being marked as
    clean again.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Introduce a callback pointer from the log to dm-raid1 layer.

    Before some region is set as "in-sync", we need to flush hardware cache on
    all the disks. But the log module doesn't have access to the mirror_set
    structure. So it will use this callback.

    So far the callback is unused, it will be used in further patches.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Introduce "flush failed" variable. When a flush before clearing a bit
    in the log fails, we don't know anything about which which regions are
    in-sync and which not.

    So we need to set all regions as not-in-sync and set the variable
    "flush_failed" to prevent setting the in-sync bit in the future.

    A target reload is the only way to get out of this situation.

    The variable will be set in following patches.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Introduce flush_header and use it to flush the log device.

    Note that we don't have to flush if all the regions transition
    from "dirty" to "clean" state.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Split the variable "touched" into two, "touched_dirtied" and
    "touched_cleaned", set when some region was dirtied or cleaned.

    This will be used to optimize flushes.

    After a transition from "dirty" to "clean" state we don't have flush hardware
    cache on the log device. After a transition from "clean" to "dirty" the cache
    must be flushed.

    Before a transition from "clean" to "dirty" state we don't have to flush all
    the raid legs. Before a transition from "dirty" to "clean" we must flush all
    the legs to make sure that they are really in sync.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     

22 Jun, 2009

2 commits

  • create_log_context() must use the logical_block_size from the log disk,
    where the I/O happens, not the target's logical_block_size.

    Signed-off-by: Mike Snitzer
    Signed-off-by: Alasdair G Kergon

    Mike Snitzer
     
  • Use i_size_read() instead of reading i_size.

    If someone changes the size of the device simultaneously, i_size_read
    is guaranteed to return a valid value (either the old one or the new one).

    i_size can return some intermediate invalid value (on 32-bit computers
    with 64-bit i_size, the reads to both halves of i_size can be interleaved
    with updates to i_size, resulting in garbage being returned).

    Cc: stable@kernel.org
    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     

23 May, 2009

1 commit

  • Until now we have had a 1:1 mapping between storage device physical
    block size and the logical block sized used when addressing the device.
    With SATA 4KB drives coming out that will no longer be the case. The
    sector size will be 4KB but the logical block size will remain
    512-bytes. Hence we need to distinguish between the physical block size
    and the logical ditto.

    This patch renames hardsect_size to logical_block_size.

    Signed-off-by: Martin K. Petersen
    Signed-off-by: Jens Axboe

    Martin K. Petersen
     

03 Apr, 2009

2 commits


06 Jan, 2009

4 commits


22 Oct, 2008

1 commit


21 Jul, 2008

1 commit


25 Apr, 2008

7 commits


08 Feb, 2008

1 commit


20 Oct, 2007

1 commit

  • There are now two phases to a suspend in device-mapper -
    presuspend and postsuspend. This patch removes the
    single 'suspend' in the logging API and replaces it with
    'presuspend' and 'postsuspend' functions to align it
    better with core device-mapper.

    A subsequent patch will make use of 'presuspend'.

    Signed-off-by: Jonathan Brassow
    Signed-off-by: Alasdair G Kergon

    Jonathan Brassow
     

10 May, 2007

4 commits

  • This patch removes the possibility of having uninitialized log state if the
    log device has failed.

    When a mirror resumes operation, it calls 'resume' on the logging module. If
    disk based logging is being used, the log device is read to fill in the log
    state. If the log device has failed, we cannot simply return, because this
    would leave the in-memory log state uninitialized. Instead, we assume all
    regions are out-of-sync and reset the log state. Failure to do this could
    result in the logging code reporting a region as in-sync, even though it
    isn't; which could result in a corrupted mirror.

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

    Jonathan Brassow
     
  • This patch ports dm-log.c to the new dm-io interface in order to make it
    scalable to have a large number of persistent dirty logs active in parallel.

    Signed-off-by: Heinz Mauelshagen
    Cc: Milan Broz
    Signed-off-by: Alasdair G Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heinz Mauelshagen
     
  • This patch reports the status of the log device so that userspace can detect
    the error and take appropriate action.

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

    Jonathan E Brassow
     
  • This patch gives the disk logging code the ability to store the fact that an
    error occured on the log device. In addition, an event is raised when an
    error is encountered during I/O to the log device.

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

    Jonathan E Brassow