• Damien Le Moal's avatar
    dm: introduce dm_remap_zone_report() · 10999307
    Damien Le Moal authored
    A target driver support zoned block devices and exposing it as such may
    receive REQ_OP_ZONE_REPORT request for the user to determine the mapped
    device zone configuration. To process properly such request, the target
    driver may need to remap the zone descriptors provided in the report
    reply. The helper function dm_remap_zone_report() does this generically
    using only the target start offset and length and the start offset
    within the target device.
    
    dm_remap_zone_report() will remap the start sector of all zones
    reported. If the report includes sequential zones, the write pointer
    position of these zones will also be remapped.
    Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
    Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
    Reviewed-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    10999307
dm.c 67.7 KB