• E
    block: Switch discard length bounds to byte-based · b9f7855a
    Eric Blake 提交于
    Sector-based limits are awkward to think about; in our on-going
    quest to move to byte-based interfaces, convert max_discard and
    discard_alignment.  Rename them, using 'pdiscard' as an aid to
    track which remaining discard interfaces need conversion, and so
    that the compiler will help us catch the change in semantics
    across any rebased code.  The BlockLimits type is now completely
    byte-based; and in iscsi.c, sector_limits_lun2qemu() is no
    longer needed.
    
    pdiscard_alignment is made unsigned (we use power-of-2 alignments
    as bitmasks, where unsigned is easier to think about) while
    leaving max_pdiscard signed (since we still have an 'int'
    interface); this is comparable to what commit cf081fca did for
    write zeroes limits.  We may later want to make everything an
    unsigned 64-bit limit - but that requires a bigger code audit.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    Reviewed-by: NFam Zheng <famz@redhat.com>
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    b9f7855a
block_int.h 30.3 KB