• E
    iscsi: Advertise realistic limits to block layer · f9e95af0
    Eric Blake 提交于
    The function sector_limits_lun2qemu() returns a value in units of
    the block layer's 512-byte sector, and can be as large as
    0x40000000, which is much larger than the block layer's inherent
    limit of BDRV_REQUEST_MAX_SECTORS.  The block layer already
    handles '0' as a synonym to the inherent limit, and it is nicer
    to return this value than it is to calculate an arbitrary
    maximum, for two reasons: we want to ensure that the block layer
    continues to special-case '0' as 'no limit beyond the inherent
    limits'; and we want to be able to someday expand the block
    layer to allow 64-bit limits, where auditing for uses of
    BDRV_REQUEST_MAX_SECTORS will help us make sure we aren't
    artificially constraining iscsi to old block layer limits.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    Reviewed-by: NKevin Wolf <kwolf@redhat.com>
    Reviewed-by: NFam Zheng <famz@redhat.com>
    Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    f9e95af0
iscsi.c 57.4 KB