Skip to content
  • Eric Blake's avatar
    4c41cb49
    block: Update comments on BDRV_BLOCK_* meanings · 4c41cb49
    Eric Blake authored
    
    
    We had some conflicting documentation: a nice 8-way table that
    described all possible combinations of DATA, ZERO, and
    OFFSET_VALID, contrasted with text that implied that OFFSET_VALID
    always meant raw data could be read directly.  Furthermore, the
    text refers a lot to bs->file, even though the interface was
    updated back in 67a0fd2a to let the driver pass back a specific
    BDS (not necessarily bs->file).  As the 8-way table is the
    intended semantics, simplify the rest of the text to get rid of
    the confusion.
    
    ALLOCATED is always set by the block layer for convenience (drivers
    do not have to worry about it).  RAW is used only internally, but
    by more than the raw driver.  Document these additional items on
    the driver callback.
    
    Suggested-by: default avatarMax Reitz <mreitz@redhat.com>
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
    Message-id: 20170507000552.20847-4-eblake@redhat.com
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    4c41cb49
    block: Update comments on BDRV_BLOCK_* meanings
    Eric Blake authored
    
    
    We had some conflicting documentation: a nice 8-way table that
    described all possible combinations of DATA, ZERO, and
    OFFSET_VALID, contrasted with text that implied that OFFSET_VALID
    always meant raw data could be read directly.  Furthermore, the
    text refers a lot to bs->file, even though the interface was
    updated back in 67a0fd2a to let the driver pass back a specific
    BDS (not necessarily bs->file).  As the 8-way table is the
    intended semantics, simplify the rest of the text to get rid of
    the confusion.
    
    ALLOCATED is always set by the block layer for convenience (drivers
    do not have to worry about it).  RAW is used only internally, but
    by more than the raw driver.  Document these additional items on
    the driver callback.
    
    Suggested-by: default avatarMax Reitz <mreitz@redhat.com>
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
    Message-id: 20170507000552.20847-4-eblake@redhat.com
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
Loading