1. 03 11月, 2016 9 次提交
  2. 01 11月, 2016 16 次提交
  3. 28 10月, 2016 9 次提交
  4. 26 10月, 2016 2 次提交
  5. 25 10月, 2016 2 次提交
  6. 19 10月, 2016 2 次提交
    • H
      sd: Implement support for ZBC devices · 89d94756
      Hannes Reinecke 提交于
      Implement ZBC support functions to setup zoned disks, both
      host-managed and host-aware models. Only zoned disks that satisfy
      the following conditions are supported:
      1) All zones are the same size, with the exception of an eventual
         last smaller runt zone.
      2) For host-managed disks, reads are unrestricted (reads are not
         failed due to zone or write pointer alignement constraints).
      Zoned disks that do not satisfy these 2 conditions are setup with
      a capacity of 0 to prevent their use.
      
      The function sd_zbc_read_zones, called from sd_revalidate_disk,
      checks that the device satisfies the above two constraints. This
      function may also change the disk capacity previously set by
      sd_read_capacity for devices reporting only the capacity of
      conventional zones at the beginning of the LBA range (i.e. devices
      reporting rc_basis set to 0).
      
      The capacity message output was moved out of sd_read_capacity into
      a new function sd_print_capacity to include this eventual capacity
      change by sd_zbc_read_zones. This new function also includes a call
      to sd_zbc_print_zones to display the number of zones and zone size
      of the device.
      Signed-off-by: NHannes Reinecke <hare@suse.de>
      
      [Damien: * Removed zone cache support
               * Removed mapping of discard to reset write pointer command
               * Modified sd_zbc_read_zones to include checks that the
                 device satisfies the kernel constraints
               * Implemeted REPORT ZONES setup and post-processing based
                 on code from Shaun Tancheff <shaun.tancheff@seagate.com>
               * Removed confusing use of 512B sector units in functions
                 interface]
      Signed-off-by: NDamien Le Moal <damien.lemoal@hgst.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NShaun Tancheff <shaun.tancheff@seagate.com>
      Tested-by: NShaun Tancheff <shaun.tancheff@seagate.com>
      Acked-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      89d94756
    • S
      blk-zoned: implement ioctls · 3ed05a98
      Shaun Tancheff 提交于
      Adds the new BLKREPORTZONE and BLKRESETZONE ioctls for respectively
      obtaining the zone configuration of a zoned block device and resetting
      the write pointer of sequential zones of a zoned block device.
      
      The BLKREPORTZONE ioctl maps directly to a single call of the function
      blkdev_report_zones. The zone information result is passed as an array
      of struct blk_zone identical to the structure used internally for
      processing the REQ_OP_ZONE_REPORT operation.  The BLKRESETZONE ioctl
      maps to a single call of the blkdev_reset_zones function.
      Signed-off-by: NShaun Tancheff <shaun.tancheff@seagate.com>
      Signed-off-by: NDamien Le Moal <damien.lemoal@hgst.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Reviewed-by: NHannes Reinecke <hare@suse.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      3ed05a98