null: Switch to byte-based read/write
commitb3241e9274ca1aafb94ad8683305bb383e11c766
authorEric Blake <eblake@redhat.com>
Tue, 24 Apr 2018 19:25:03 +0000 (24 14:25 -0500)
committerKevin Wolf <kwolf@redhat.com>
Tue, 15 May 2018 14:11:41 +0000 (15 16:11 +0200)
treef51897bae35c7db74693f8c7ceb4466dafc62536
parentde7056a3f95e85aa6bba30ad4b37a8dbc2b072ab
null: Switch to byte-based read/write

We are gradually moving away from sector-based interfaces, towards
byte-based.  Make the change for the last few sector-based callbacks
in the null-co and null-aio drivers.

Note that since the null driver does nothing on writes, it trivially
supports the BDRV_REQ_FUA flag (all writes have already landed to
the same bit-bucket without needing an extra flush call).  Also, since
the null driver does just as well with byte-based requests, we can
now avoid cycles wasted on read-modify-write by taking advantage of
the block layer now defaulting the alignment to 1 instead of 512.

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/null.c