• Damien Le Moal's avatar
    null_blk: Improve implicit zone close · 2e8c6e0e
    Damien Le Moal authored
    When open zone resource management is enabled, that is, when a null_blk
    zoned device is created with zone_max_open different than 0, implicitly
    or explicitly opening a zone may require implicitly closing a zone
    that is already implicitly open. This operation is done using the
    function null_close_first_imp_zone(), which search for an implicitly
    open zone to close starting from the first sequential zone. This
    implementation is simple but may result in the same being constantly
    implicitly closed and then implicitly reopened on write, namely, the
    lowest numbered zone that is being written.
    
    Avoid this by starting the search for an implicitly open zone starting
    from the zone following the last zone that was implicitly closed. The
    function null_close_first_imp_zone() is renamed
    null_close_imp_open_zone().
    Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
    Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    2e8c6e0e
null_blk.h 4.73 KB