Skip to content
  • Kevin Wolf's avatar
    bfd18d1e
    block: Move enable_write_cache to BB level · bfd18d1e
    Kevin Wolf authored
    
    
    Whether a write cache is used or not is a decision that concerns the
    user (e.g. the guest device) rather than the backend. It was already
    logically part of the BB level as bdrv_move_feature_fields() always kept
    it on top of the BDS tree; with this patch, the core of it (the actual
    flag and the additional flushes) is also implemented there.
    
    Direct callers of bdrv_open() must pass BDRV_O_CACHE_WB now if bs
    doesn't have a BlockBackend attached.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
    bfd18d1e
    block: Move enable_write_cache to BB level
    Kevin Wolf authored
    
    
    Whether a write cache is used or not is a decision that concerns the
    user (e.g. the guest device) rather than the backend. It was already
    logically part of the BB level as bdrv_move_feature_fields() always kept
    it on top of the BDS tree; with this patch, the core of it (the actual
    flag and the additional flushes) is also implemented there.
    
    Direct callers of bdrv_open() must pass BDRV_O_CACHE_WB now if bs
    doesn't have a BlockBackend attached.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
Loading