block: Update comments on BDRV_BLOCK_* meanings
commit4c41cb4955effff3447bd07a09e0af9c6e0453e3
authorEric Blake <eblake@redhat.com>
Sun, 7 May 2017 00:05:43 +0000 (6 19:05 -0500)
committerMax Reitz <mreitz@redhat.com>
Thu, 11 May 2017 12:28:06 +0000 (11 14:28 +0200)
tree9e42d381fbf31c13212e7b676d1feb2a7a540ede
parentbbd995d8307e4a15a7724f11adf104b6e07a0849
block: Update comments on BDRV_BLOCK_* meanings

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: Max Reitz <mreitz@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20170507000552.20847-4-eblake@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
include/block/block.h
include/block/block_int.h