Skip to content
  • Hanna Reitz's avatar
    c80d8b06
    block: Add @exact parameter to bdrv_co_truncate() · c80d8b06
    Hanna Reitz authored
    
    
    We have two drivers (iscsi and file-posix) that (in some cases) return
    success from their .bdrv_co_truncate() implementation if the block
    device is larger than the requested offset, but cannot be shrunk.  Some
    callers do not want that behavior, so this patch adds a new parameter
    that they can use to turn off that behavior.
    
    This patch just adds the parameter and lets the block/io.c and
    block/block-backend.c functions pass it around.  All other callers
    always pass false and none of the implementations evaluate it, so that
    this patch does not change existing behavior.  Future patches take care
    of that.
    
    Suggested-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Message-id: 20190918095144.955-5-mreitz@redhat.com
    Reviewed-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    c80d8b06
    block: Add @exact parameter to bdrv_co_truncate()
    Hanna Reitz authored
    
    
    We have two drivers (iscsi and file-posix) that (in some cases) return
    success from their .bdrv_co_truncate() implementation if the block
    device is larger than the requested offset, but cannot be shrunk.  Some
    callers do not want that behavior, so this patch adds a new parameter
    that they can use to turn off that behavior.
    
    This patch just adds the parameter and lets the block/io.c and
    block/block-backend.c functions pass it around.  All other callers
    always pass false and none of the implementations evaluate it, so that
    this patch does not change existing behavior.  Future patches take care
    of that.
    
    Suggested-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Message-id: 20190918095144.955-5-mreitz@redhat.com
    Reviewed-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
Loading