[PATCH 0/3] quorum: Require WRITE perm with rewrite-corrupted

Max Reitz posted 3 patches 3 years, 5 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201113211718.261671-1-mreitz@redhat.com
Maintainers: Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Alberto Garcia <berto@igalia.com>
block/quorum.c             |  5 ++++
tests/qemu-iotests/081     | 61 ++++++++++++++++++++++++++++++++++++--
tests/qemu-iotests/081.out | 27 +++++++++++++++++
3 files changed, 90 insertions(+), 3 deletions(-)
[PATCH 0/3] quorum: Require WRITE perm with rewrite-corrupted
Posted by Max Reitz 3 years, 5 months ago
Hi,

While reviewing Berto’s block-status/write-zeroes series for quorum, I
wondered how quorum’s permission code handles rewrite-corrupted.  It
turns out it doesn’t, and so qemu with a read-only rewrite-corrupted
quorum node simply crashes once there is a mismatch that leads to a
rewrite.

It looks to me like this bug has existed for quite some time, so I don’t
think this series must go into 5.2.  OTOH, it’s a simple bug fix, so I
suppose it might as well.


Max Reitz (3):
  quorum: Require WRITE perm with rewrite-corrupted
  iotests/081: Filter image format after testdir
  iotests/081: Test rewrite-corrupted without WRITE

 block/quorum.c             |  5 ++++
 tests/qemu-iotests/081     | 61 ++++++++++++++++++++++++++++++++++++--
 tests/qemu-iotests/081.out | 27 +++++++++++++++++
 3 files changed, 90 insertions(+), 3 deletions(-)

-- 
2.28.0


Re: [PATCH 0/3] quorum: Require WRITE perm with rewrite-corrupted
Posted by Kevin Wolf 3 years, 5 months ago
Am 13.11.2020 um 22:17 hat Max Reitz geschrieben:
> Hi,
> 
> While reviewing Berto’s block-status/write-zeroes series for quorum, I
> wondered how quorum’s permission code handles rewrite-corrupted.  It
> turns out it doesn’t, and so qemu with a read-only rewrite-corrupted
> quorum node simply crashes once there is a mismatch that leads to a
> rewrite.
> 
> It looks to me like this bug has existed for quite some time, so I don’t
> think this series must go into 5.2.  OTOH, it’s a simple bug fix, so I
> suppose it might as well.

Thanks, applied to the block branch.

Kevin