Skip to content
Commit bfcc224e authored by Aapo Vienamo's avatar Aapo Vienamo Committed by Kevin Wolf
Browse files

block: Add blklogwrites



Implements a block device write logging system, similar to Linux kernel
device mapper dm-log-writes. The write operations that are performed
on a block device are logged to a file or another block device. The
write log format is identical to the dm-log-writes format. Currently,
log markers are not supported.

This functionality can be used for crash consistency and fs consistency
testing. By implementing it in qemu, tests utilizing write logs can be
be used to test non-Linux drivers and older kernels.

The driver accepts an optional parameter to set the sector size used
for logging. This makes the driver require all requests to be aligned
to this sector size and also makes offsets and sizes of writes in the
log metadata to be expressed in terms of this value (the log format has
a granularity of one sector for offsets and sizes). This allows
accurate logging of writes to guest block devices that have unusual
sector sizes.

The implementation is based on the blkverify and blkdebug block
drivers.

Signed-off-by: default avatarAapo Vienamo <aapo@tuxera.com>
Signed-off-by: default avatarAri Sundholm <ari@tuxera.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 7ae9f3f6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment