1. 30 May, 2018 1 commit
  2. 17 Oct, 2016 1 commit
  3. 07 Aug, 2016 1 commit
    • Jens Axboe's avatar
      block: rename bio bi_rw to bi_opf · 1eff9d32
      Jens Axboe authored
      Since commit 63a4cc24, bio->bi_rw contains flags in the lower
      portion and the op code in the higher portions. This means that
      old code that relies on manually setting bi_rw is most likely
      going to be broken. Instead of letting that brokeness linger,
      rename the member, to force old and out-of-tree code to break
      at compile time instead of at runtime.
      
      No intended functional changes in this commit.
      Signed-off-by: 's avatarJens Axboe <axboe@fb.com>
      1eff9d32
  4. 14 Jun, 2016 1 commit
  5. 07 Jun, 2016 1 commit
  6. 05 May, 2016 2 commits
  7. 10 Mar, 2016 1 commit
  8. 10 Dec, 2015 2 commits
    • Sami Tolvanen's avatar
      dm verity: add ignore_zero_blocks feature · 0cc37c2d
      Sami Tolvanen authored
      If ignore_zero_blocks is enabled dm-verity will return zeroes for blocks
      matching a zero hash without validating the content.
      Signed-off-by: 's avatarSami Tolvanen <samitolvanen@google.com>
      Signed-off-by: 's avatarMike Snitzer <snitzer@redhat.com>
      0cc37c2d
    • Sami Tolvanen's avatar
      dm verity: add support for forward error correction · a739ff3f
      Sami Tolvanen authored
      Add support for correcting corrupted blocks using Reed-Solomon.
      
      This code uses RS(255, N) interleaved across data and hash
      blocks. Each error-correcting block covers N bytes evenly
      distributed across the combined total data, so that each byte is a
      maximum distance away from the others. This makes it possible to
      recover from several consecutive corrupted blocks with relatively
      small space overhead.
      
      In addition, using verity hashes to locate erasures nearly doubles
      the effectiveness of error correction. Being able to detect
      corrupted blocks also improves performance, because only corrupted
      blocks need to corrected.
      
      For a 2 GiB partition, RS(255, 253) (two parity bytes for each
      253-byte block) can correct up to 16 MiB of consecutive corrupted
      blocks if erasures can be located, and 8 MiB if they cannot, with
      16 MiB space overhead.
      Signed-off-by: 's avatarSami Tolvanen <samitolvanen@google.com>
      Signed-off-by: 's avatarMike Snitzer <snitzer@redhat.com>
      a739ff3f
  9. 31 Oct, 2015 1 commit
  10. 09 Oct, 2015 1 commit
  11. 31 Aug, 2015 1 commit
  12. 18 Aug, 2015 1 commit
  13. 16 Jul, 2015 2 commits
  14. 17 Jun, 2015 3 commits
  15. 11 Jun, 2015 1 commit
    • Joe Thornber's avatar
      dm cache: add fail io mode and needs_check flag · 028ae9f7
      Joe Thornber authored
      If a cache metadata operation fails (e.g. transaction commit) the
      cache's metadata device will abort the current transaction, set a new
      needs_check flag, and the cache will transition to "read-only" mode.  If
      aborting the transaction or setting the needs_check flag fails the cache
      will transition to "fail-io" mode.
      
      Once needs_check is set the cache device will not be allowed to
      activate.  Activation requires write access to metadata.  Future work is
      needed to add proper support for running the cache in read-only mode.
      
      Once in fail-io mode the cache will report a status of "Fail".
      
      Also, add commit() wrapper that will disallow commits if in read_only or
      fail mode.
      Signed-off-by: 's avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: 's avatarMike Snitzer <snitzer@redhat.com>
      028ae9f7
  16. 29 May, 2015 2 commits
    • Heinz Mauelshagen's avatar
      dm raid: add support for the MD RAID0 personality · 0cf45031
      Heinz Mauelshagen authored
      Add dm-raid access to the MD RAID0 personality to enable single zone
      striping.
      
      The following changes enable that access:
      - add type definition to raid_types array
      - make bitmap creation conditonal in super_validate(), because
        bitmaps are not allowed in raid0
      - set rdev->sectors to the data image size in super_validate()
        to allow the raid0 personality to calculate the MD array
        size properly
      - use mdddev(un)lock() functions instead of direct mutex_(un)lock()
        (wrapped in here because it's a trivial change)
      - enhance raid_status() to always report full sync for raid0
        so that userspace checks for 100% sync will succeed and allow
        for resize (and takeover/reshape once added in future paches)
      - enhance raid_resume() to not load bitmap in case of raid0
      - add merge function to avoid data corruption (seen with readahead)
        that resulted from bio payloads that grew too large.  This problem
        did not occur with the other raid levels because it either did not
        apply without striping (raid1) or was avoided via stripe caching.
      - raise version to 1.7.0 because of the raid0 API change
      Signed-off-by: 's avatarHeinz Mauelshagen <heinzm@redhat.com>
      Reviewed-by: 's avatarJonathan Brassow <jbrassow@redhat.com>
      Signed-off-by: 's avatarMike Snitzer <snitzer@redhat.com>
      0cf45031
    • Heinz Mauelshagen's avatar
      dm raid: fixup documentation for discard support · 0f4106b3
      Heinz Mauelshagen authored
      Remove comment above parse_raid_params() that claims
      "devices_handle_discard_safely" is a table line argument when it is
      actually is a module parameter.
      
      Also, backfill dm-raid target version 1.6.0 documentation.
      Signed-off-by: 's avatarHeinz Mauelshagen <heinzm@redhat.com>
      Reviewed-by: 's avatarJonathan Brassow <jbrassow@redhat.com>
      Signed-off-by: 's avatarMike Snitzer <snitzer@redhat.com>
      0f4106b3
  17. 15 Apr, 2015 4 commits
  18. 31 Mar, 2015 1 commit
  19. 16 Feb, 2015 2 commits
  20. 10 Nov, 2014 2 commits
  21. 01 Aug, 2014 1 commit
  22. 20 May, 2014 1 commit
    • Mike Snitzer's avatar
      dm thin: add 'no_space_timeout' dm-thin-pool module param · 80c57893
      Mike Snitzer authored
      Commit 85ad643b ("dm thin: add timeout to stop out-of-data-space mode
      holding IO forever") introduced a fixed 60 second timeout.  Users may
      want to either disable or modify this timeout.
      
      Allow the out-of-data-space timeout to be configured using the
      'no_space_timeout' dm-thin-pool module param.  Setting it to 0 will
      disable the timeout, resulting in IO being queued until more data space
      is added to the thin-pool.
      Signed-off-by: 's avatarMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org # 3.14+
      80c57893
  23. 27 Mar, 2014 1 commit
    • Joe Thornber's avatar
      dm: add era target · eec40579
      Joe Thornber authored
      dm-era is a target that behaves similar to the linear target.  In
      addition it keeps track of which blocks were written within a user
      defined period of time called an 'era'.  Each era target instance
      maintains the current era as a monotonically increasing 32-bit
      counter.
      
      Use cases include tracking changed blocks for backup software, and
      partially invalidating the contents of a cache to restore cache
      coherency after rolling back a vendor snapshot.
      
      dm-era is primarily expected to be paired with the dm-cache target.
      Signed-off-by: 's avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: 's avatarMike Snitzer <snitzer@redhat.com>
      eec40579
  24. 06 Mar, 2014 1 commit
  25. 05 Mar, 2014 1 commit
    • Mike Snitzer's avatar
      dm thin: ensure user takes action to validate data and metadata consistency · 07f2b6e0
      Mike Snitzer authored
      If a thin metadata operation fails the current transaction will abort,
      whereby causing potential for IO layers up the stack (e.g. filesystems)
      to have data loss.  As such, set THIN_METADATA_NEEDS_CHECK_FLAG in the
      thin metadata's superblock which:
      1) requires the user verify the thin metadata is consistent (e.g. use
         thin_check, etc)
      2) suggests the user verify the thin data is consistent (e.g. use fsck)
      
      The only way to clear the superblock's THIN_METADATA_NEEDS_CHECK_FLAG is
      to run thin_repair.
      
      On metadata operation failure: abort current metadata transaction, set
      pool in read-only mode, and now set the needs_check flag.
      
      As part of this change, constraints are introduced or relaxed:
      * don't allow a pool to transition to write mode if needs_check is set
      * don't allow data or metadata space to be resized if needs_check is set
      * if a thin pool's metadata space is exhausted: the kernel will now
        force the user to take the pool offline for repair before the kernel
        will allow the metadata space to be extended.
      
      Also, update Documentation to include information about when the thin
      provisioning target commits metadata, how it handles metadata failures
      and running out of space.
      Signed-off-by: 's avatarMike Snitzer <snitzer@redhat.com>
      Signed-off-by: 's avatarJoe Thornber <ejt@redhat.com>
      07f2b6e0
  26. 16 Jan, 2014 1 commit
    • Mike Snitzer's avatar
      dm cache: add policy name to status output · 2e68c4e6
      Mike Snitzer authored
      The cache's policy may have been established using the "default" alias,
      which is currently the "mq" policy but the default policy may change in
      the future.  It is useful to know exactly which policy is being used.
      
      Add a 'real' member to the dm_cache_policy_type structure and have the
      "default" dm_cache_policy_type point to the real "mq"
      dm_cache_policy_type.  Update dm_cache_policy_get_name() to check if
      real is set, if so report the name of the real policy (not the alias).
      Requested-by: 's avatarJonathan Brassow <jbrassow@redhat.com>
      Signed-off-by: 's avatarMike Snitzer <snitzer@redhat.com>
      2e68c4e6
  27. 10 Jan, 2014 1 commit
    • Mike Snitzer's avatar
      dm cache: add block sizes and total cache blocks to status output · 6a388618
      Mike Snitzer authored
      Improve cache_status to emit:
      <metadata block size> <#used metadata blocks>/<#total metadata blocks>
      <cache block size> <#used cache blocks>/<#total cache blocks>
      ...
      
      Adding the block sizes allows for easier calculation of the overall size
      of both the metadata and cache devices.  Adding <#total cache blocks>
      provides useful context for how much of the cache is used.
      
      Unfortunately these additions to the status will require updates to
      users' scripts that monitor the cache status.  But these changes help
      provide more comprehensive information about the cache device and will
      simplify tools that are being developed to manage dm-cache devices --
      because they won't need to issue 3 operations to cobble together the
      information that we can easily provide via a single status ioctl.
      
      While updating the status documentation in cache.txt spaces were
      tabify'd.
      Requested-by: 's avatarJonathan Brassow <jbrassow@redhat.com>
      Signed-off-by: 's avatarMike Snitzer <snitzer@redhat.com>
      Acked-by: 's avatarJoe Thornber <ejt@redhat.com>
      6a388618
  28. 07 Jan, 2014 2 commits
    • Joe Thornber's avatar
      dm cache policy mq: introduce three promotion threshold tunables · 78e03d69
      Joe Thornber authored
      Internally the mq policy maintains a promotion threshold variable.  If
      the hit count of a block not in the cache goes above this threshold it
      gets promoted to the cache.
      
      This patch introduces three new tunables that allow you to tweak the
      promotion threshold by adding a small value.  These adjustments depend
      on the io type:
      
         read_promote_adjustment:    READ io, default 4
         write_promote_adjustment:   WRITE io, default 8
         discard_promote_adjustment: READ/WRITE io to a discarded block, default 1
      
      If you're trying to quickly warm a new cache device you may wish to
      reduce these to encourage promotion.  Remember to switch them back to
      their defaults after the cache fills though.
      Signed-off-by: 's avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: 's avatarMike Snitzer <snitzer@redhat.com>
      78e03d69
    • Mike Snitzer's avatar
      dm thin: add error_if_no_space feature · 787a996c
      Mike Snitzer authored
      If the pool runs out of data or metadata space, the pool can either
      queue or error the IO destined to the data device.  The default is to
      queue the IO until more space is added.
      
      An admin may now configure the pool to error IO when no space is
      available by setting the 'error_if_no_space' feature when loading the
      thin-pool table.
      Signed-off-by: 's avatarMike Snitzer <snitzer@redhat.com>
      Acked-by: 's avatarJoe Thornber <ejt@redhat.com>
      787a996c