Skip to content
  • Paolo Bonzini's avatar
    160a29e2
    block: move has_variable_length to BlockLimits · 160a29e2
    Paolo Bonzini authored
    
    
    At the protocol level, has_variable_length only needs to be true in the
    very special case of host CD-ROM drives, so that they do not need an
    explicit monitor command to read the new size when a disc is loaded
    in the tray.
    
    However, at the format level has_variable_length has to be true for all
    raw blockdevs and for all filters, even though in practice the length
    depends on the underlying file and thus will not change except in the
    case of host CD-ROM drives.
    
    As a first step towards computing an accurate value of has_variable_length,
    add the value into the BlockLimits structure and initialize the field
    from the BlockDriver.
    
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Message-Id: <20230407153303.391121-2-pbonzini@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    160a29e2
    block: move has_variable_length to BlockLimits
    Paolo Bonzini authored
    
    
    At the protocol level, has_variable_length only needs to be true in the
    very special case of host CD-ROM drives, so that they do not need an
    explicit monitor command to read the new size when a disc is loaded
    in the tray.
    
    However, at the format level has_variable_length has to be true for all
    raw blockdevs and for all filters, even though in practice the length
    depends on the underlying file and thus will not change except in the
    case of host CD-ROM drives.
    
    As a first step towards computing an accurate value of has_variable_length,
    add the value into the BlockLimits structure and initialize the field
    from the BlockDriver.
    
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Message-Id: <20230407153303.391121-2-pbonzini@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading