Skip to content
  • Fam Zheng's avatar
    1a529736
    block: Fix flags in reopen queue · 1a529736
    Fam Zheng authored
    
    
    Reopen flags are not synchronized according to the
    bdrv_reopen_queue_child precedence until bdrv_reopen_prepare. It is a
    bit too late: we already check the consistency in bdrv_check_perm before
    that.
    
    This fixes the bug that when bdrv_reopen a RO node as RW, the flags for
    backing child are wrong. Before, we could recurse with flags.rw=1; now,
    role->inherit_options + update_flags_from_options will make sure to
    clear the bit when necessary.  Note that this will not clear an
    explicitly set bit, as in the case of parallel block jobs (e.g.
    test_stream_parallel in 030), because the explicit options include
    'read-only=false' (for an intermediate node used by a different job).
    
    Signed-off-by: default avatarFam Zheng <famz@redhat.com>
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    1a529736
    block: Fix flags in reopen queue
    Fam Zheng authored
    
    
    Reopen flags are not synchronized according to the
    bdrv_reopen_queue_child precedence until bdrv_reopen_prepare. It is a
    bit too late: we already check the consistency in bdrv_check_perm before
    that.
    
    This fixes the bug that when bdrv_reopen a RO node as RW, the flags for
    backing child are wrong. Before, we could recurse with flags.rw=1; now,
    role->inherit_options + update_flags_from_options will make sure to
    clear the bit when necessary.  Note that this will not clear an
    explicitly set bit, as in the case of parallel block jobs (e.g.
    test_stream_parallel in 030), because the explicit options include
    'read-only=false' (for an intermediate node used by a different job).
    
    Signed-off-by: default avatarFam Zheng <famz@redhat.com>
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading