]> git.proxmox.com Git - mirror_qemu.git/commit
blkdebug: Sanity check block layer guarantees
authorEric Blake <eblake@redhat.com>
Sat, 29 Apr 2017 19:14:14 +0000 (14:14 -0500)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 3 Aug 2017 21:00:51 +0000 (16:00 -0500)
commita1a3d603c4484ff06b4338e73713bdea8f298b45
treeab0ddc59bf85cd9553f0af5be5c921d008d14dca
parent0b185544c98671373a7ea9f2abc1de50a498a722
blkdebug: Sanity check block layer guarantees

Commits 04ed95f4 and 1a62d0ac updated the block layer to auto-fragment
any I/O to fit within device boundaries. Additionally, when using a
minimum alignment of 4k, we want to ensure the block layer does proper
read-modify-write rather than requesting I/O on a slice of a sector.
Let's enforce that the contract is obeyed when using blkdebug.  For
now, blkdebug only allows alignment overrides, and just inherits other
limits from whatever device it is wrapping, but a future patch will
further enhance things.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20170429191419.30051-5-eblake@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
(cherry picked from commit e0ef439588ce1ede747f82b77d893190c1cc9f4d)
* prereq for 81c219a
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/blkdebug.c