Skip to content
Snippets Groups Projects
  • Eric Blake's avatar
    b3241e92
    null: Switch to byte-based read/write · b3241e92
    Eric Blake authored
    
    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: default avatarEric Blake <eblake@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    b3241e92
    History
    null: Switch to byte-based read/write
    Eric Blake authored
    
    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: default avatarEric Blake <eblake@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>