[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v3 0/8] block: Ignore loosening per
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v3 0/8] block: Ignore loosening perm restrictions failures |
Date: |
Wed, 22 May 2019 13:24:12 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 5/22/19 12:03 PM, Max Reitz wrote:
> Hi,
>
> This series is mainly a fix for
> https://bugzilla.redhat.com/show_bug.cgi?id=1703793. The problem
> described there is that mirroring to a gluster volume, then switching
> off the volume makes qemu crash. There are two problems here:
>
> (1) file-posix reopens the FD all the time because it thinks the FD it
> has is RDONLY. It actually isn’t after the first reopen, we just
> forgot to change the internal flags. That’s what patch 1 is for.
>
> (2) Even then, when mirror completes, it drops its write permission on
> the FD. This requires a reopen, which will fail if the volume is
> down. Mirror doesn’t expect that. Nobody ever expects that
> dropping permissions can fail, and rightfully so because that’s what
> I think we have generally agreed on.
> Therefore, the block layer should hide this error. This is what the
> last two patches are for.
>
> The penultimate patch adds two assertions: bdrv_replace_child() (for the
> old BDS) and bdrv_inactivate_recurse() assume they only ever drop
> assertions. This is now substantiated by these new assertions.
> It turns out that this assumption was just plain wrong. Patches 3 to 5
> make it right.
>
>
> v3:
> - Received no reply to my “Hm, warnings break 'make check', so maybe we
> should just keep quiet if loosening restrictions fails?” question, so
> I assume silence means agreement. Changed patch 7 accordingly.
>
I don't know if there is an easy way to warn for normal users, but
silence the warnings if run under test setups to keep 'make check'
output unchanged (I know we've silenced warnings in the past when we
detect we are running qtest, but this isn't necessarily the same setup).
So not a show-stopper for me.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH v3 0/8] block: Ignore loosening perm restrictions failures, Max Reitz, 2019/05/22
- [Qemu-block] [PATCH v3 1/8] file-posix: Update open_flags in raw_set_perm(), Max Reitz, 2019/05/22
- [Qemu-block] [PATCH v3 4/8] block/commit: Drop bdrv_child_try_set_perm(), Max Reitz, 2019/05/22
- [Qemu-block] [PATCH v3 2/8] block: Add bdrv_child_refresh_perms(), Max Reitz, 2019/05/22
- [Qemu-block] [PATCH v3 7/8] block: Ignore loosening perm restrictions failures, Max Reitz, 2019/05/22
- [Qemu-block] [PATCH v3 3/8] block/mirror: Fix child permissions, Max Reitz, 2019/05/22
- [Qemu-block] [PATCH v3 5/8] block: Fix order in bdrv_replace_child(), Max Reitz, 2019/05/22
- [Qemu-block] [PATCH v3 6/8] block: Add *tighten_restrictions to *check*_perm(), Max Reitz, 2019/05/22
- [Qemu-block] [PATCH v3 8/8] iotests: Test failure to loosen restrictions, Max Reitz, 2019/05/22
- Re: [Qemu-block] [Qemu-devel] [PATCH v3 0/8] block: Ignore loosening perm restrictions failures,
Eric Blake <=