1. 01 Dec, 2016 3 commits
    • Chaitanya Kulkarni's avatar
      block: add support for REQ_OP_WRITE_ZEROES · a6f0788e
      Chaitanya Kulkarni authored
      This adds a new block layer operation to zero out a range of
      LBAs. This allows to implement zeroing for devices that don't use
      either discard with a predictable zero pattern or WRITE SAME of zeroes.
      The prominent example of that is NVMe with the Write Zeroes command,
      but in the future, this should also help with improving the way
      zeroing discards work. For this operation, suitable entry is exported in
      sysfs which indicate the number of maximum bytes allowed in one
      write zeroes operation by the device.
      Signed-off-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      a6f0788e
    • Chaitanya Kulkarni's avatar
      block: add async variant of blkdev_issue_zeroout · e73c23ff
      Chaitanya Kulkarni authored
      Similar to __blkdev_issue_discard this variant allows submitting
      the final bio asynchronously and chaining multiple ranges
      into a single completion.
      Signed-off-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      e73c23ff
    • Damien Le Moal's avatar
      block: Check partition alignment on zoned block devices · b02d8aae
      Damien Le Moal authored
      Both blkdev_report_zones and blkdev_reset_zones can operate on a partition of
      a zoned block device. However, the first and last zones reported for a
      partition make sense only if the partition start sector and size are aligned
      on the device zone size. The same applies for zone reset. Resetting the first
      or the last zone of a partition straddling zones may impact neighboring
      partitions. Finally, if a partition start sector is not at the beginning of a
      sequential zone, it will be impossible to write to the first sectors of the
      partition on a host-managed device.
      Avoid all these problems and incoherencies by ignoring partitions that are not
      zone aligned.
      
      Note: Even with CONFIG_BLK_DEV_ZONED disabled, bdev_is_zoned() will report the
      correct disk zoning type (host-aware, host-managed or none) but
      bdev_zone_size() will always return 0 for zoned block devices (i.e. the zone
      size is unknown). So test this as a way to ensure that a zoned block device is
      being handled as such. As a result, for a host-aware devices, unaligned zone
      partitions will be accepted with CONFIG_BLK_DEV_ZONED disabled. That is, the
      disk will be treated as a regular block device (as it should). If zoned block
      device support is enabled, only aligned partitions will be accepted.
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      b02d8aae
  2. 29 Nov, 2016 24 commits
  3. 28 Nov, 2016 3 commits
  4. 23 Nov, 2016 1 commit
  5. 22 Nov, 2016 9 commits