• Hannes Reinecke's avatar
    sd: Implement support for ZBC devices · 89d94756
    Hannes Reinecke authored
    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 b...
    89d94756
Makefile 7.57 KB