Skip to content

Commit bfcc224

Browse files
Aapo Vienamokevmw
Aapo Vienamo
authored andcommitted
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: Aapo Vienamo <[email protected]> Signed-off-by: Ari Sundholm <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
1 parent 7ae9f3f commit bfcc224

File tree

4 files changed

+448
-6
lines changed

4 files changed

+448
-6
lines changed

MAINTAINERS

+6
Original file line numberDiff line numberDiff line change
@@ -2052,6 +2052,12 @@ S: Supported
20522052
F: block/quorum.c
20532053
20542054

2055+
blklogwrites
2056+
M: Ari Sundholm <[email protected]>
2057+
2058+
S: Supported
2059+
F: block/blklogwrites.c
2060+
20552061
blkverify
20562062
M: Stefan Hajnoczi <[email protected]>
20572063

block/Makefile.objs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ block-obj-y += qed-check.o
55
block-obj-y += vhdx.o vhdx-endian.o vhdx-log.o
66
block-obj-y += quorum.o
77
block-obj-y += parallels.o blkdebug.o blkverify.o blkreplay.o
8+
block-obj-y += blklogwrites.o
89
block-obj-y += block-backend.o snapshot.o qapi.o
910
block-obj-$(CONFIG_WIN32) += file-win32.o win32-aio.o
1011
block-obj-$(CONFIG_POSIX) += file-posix.o

0 commit comments

Comments
 (0)