Skip to content
  • Alberto Garcia's avatar
    077e8e20
    block: Add 'keep_old_opts' parameter to bdrv_reopen_queue() · 077e8e20
    Alberto Garcia authored
    
    
    The bdrv_reopen_queue() function is used to create a queue with
    the BDSs that are going to be reopened and their new options. Once
    the queue is ready bdrv_reopen_multiple() is called to perform the
    operation.
    
    The original options from each one of the BDSs are kept, with the new
    options passed to bdrv_reopen_queue() applied on top of them.
    
    For "x-blockdev-reopen" we want a function that behaves much like
    "blockdev-add". We want to ignore the previous set of options so that
    only the ones actually specified by the user are applied, with the
    rest having their default values.
    
    One of the things that we need is a way to tell bdrv_reopen_queue()
    whether we want to keep the old set of options or not, and that's what
    this patch does. All current callers are setting this new parameter to
    true and x-blockdev-reopen will set it to false.
    
    Signed-off-by: default avatarAlberto Garcia <berto@igalia.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    077e8e20
    block: Add 'keep_old_opts' parameter to bdrv_reopen_queue()
    Alberto Garcia authored
    
    
    The bdrv_reopen_queue() function is used to create a queue with
    the BDSs that are going to be reopened and their new options. Once
    the queue is ready bdrv_reopen_multiple() is called to perform the
    operation.
    
    The original options from each one of the BDSs are kept, with the new
    options passed to bdrv_reopen_queue() applied on top of them.
    
    For "x-blockdev-reopen" we want a function that behaves much like
    "blockdev-add". We want to ignore the previous set of options so that
    only the ones actually specified by the user are applied, with the
    rest having their default values.
    
    One of the things that we need is a way to tell bdrv_reopen_queue()
    whether we want to keep the old set of options or not, and that's what
    this patch does. All current callers are setting this new parameter to
    true and x-blockdev-reopen will set it to false.
    
    Signed-off-by: default avatarAlberto Garcia <berto@igalia.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading