Skip to content
  • Hanna Reitz's avatar
    54fd1b0d
    block: qobject_is_equal() in bdrv_reopen_prepare() · 54fd1b0d
    Hanna Reitz authored
    
    
    Currently, bdrv_reopen_prepare() assumes that all BDS options are
    strings. However, this is not the case if the BDS has been created
    through the json: pseudo-protocol or blockdev-add.
    
    Note that the user-invokable reopen command is an HMP command, so you
    can only specify strings there. Therefore, specifying a non-string
    option with the "same" value as it was when originally created will now
    return an error because the values are supposedly similar (and there is
    no way for the user to circumvent this but to just not specify the
    option again -- however, this is still strictly better than just
    crashing).
    
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Message-id: 20171114180128.17076-5-mreitz@redhat.com
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    54fd1b0d
    block: qobject_is_equal() in bdrv_reopen_prepare()
    Hanna Reitz authored
    
    
    Currently, bdrv_reopen_prepare() assumes that all BDS options are
    strings. However, this is not the case if the BDS has been created
    through the json: pseudo-protocol or blockdev-add.
    
    Note that the user-invokable reopen command is an HMP command, so you
    can only specify strings there. Therefore, specifying a non-string
    option with the "same" value as it was when originally created will now
    return an error because the values are supposedly similar (and there is
    no way for the user to circumvent this but to just not specify the
    option again -- however, this is still strictly better than just
    crashing).
    
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Message-id: 20171114180128.17076-5-mreitz@redhat.com
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
Loading