From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6EWk-0004sT-1T for qemu-devel@nongnu.org; Fri, 27 May 2016 05:58:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6EWf-0004lO-9P for qemu-devel@nongnu.org; Fri, 27 May 2016 05:57:57 -0400 References: <1463470536-8981-1-git-send-email-famz@redhat.com> <1463470536-8981-8-git-send-email-famz@redhat.com> <20160527074846.GB15113@ad.usersys.redhat.com> From: Max Reitz Message-ID: <3a4f4b70-cc34-ddee-ce3d-9fe19a806f05@redhat.com> Date: Fri, 27 May 2016 11:57:42 +0200 MIME-Version: 1.0 In-Reply-To: <20160527074846.GB15113@ad.usersys.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rNGqNJwJOu38vgJFqpat1DDn7EJvVrcOe" Subject: Re: [Qemu-devel] [PATCH v5 07/27] block: Handle image locking during reopen List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-devel@nongnu.org, Kevin Wolf , Jeff Cody , Markus Armbruster , Eric Blake , John Snow , qemu-block@nongnu.org, berrange@redhat.com, pbonzini@redhat.com, den@openvz.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --rNGqNJwJOu38vgJFqpat1DDn7EJvVrcOe From: Max Reitz To: Fam Zheng Cc: qemu-devel@nongnu.org, Kevin Wolf , Jeff Cody , Markus Armbruster , Eric Blake , John Snow , qemu-block@nongnu.org, berrange@redhat.com, pbonzini@redhat.com, den@openvz.org, stefanha@redhat.com Message-ID: <3a4f4b70-cc34-ddee-ce3d-9fe19a806f05@redhat.com> Subject: Re: [PATCH v5 07/27] block: Handle image locking during reopen References: <1463470536-8981-1-git-send-email-famz@redhat.com> <1463470536-8981-8-git-send-email-famz@redhat.com> <20160527074846.GB15113@ad.usersys.redhat.com> In-Reply-To: <20160527074846.GB15113@ad.usersys.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 27.05.2016 09:48, Fam Zheng wrote: > On Tue, 05/24 18:28, Max Reitz wrote: [...] >> Also: Should bdrv_reopen_prepare() check that the locking flags are no= t >> changed? >=20 > Read only flag also matters in fcntl locks, so practically we almost al= ways > need some change on the lock. Hm, but as far as I can see, you don't handle changed locking flags here; the reopened image is just locked if the old one had been locked before. Since the handling of BDRV_O_SHARED_LOCK is done in bdrv_lock_unlock_image_do(), that means that BDRV_O_NO_LOCK is ignored if changed, isn't it? Max --rNGqNJwJOu38vgJFqpat1DDn7EJvVrcOe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXSBoWAAoJEDuxQgLoOKyta1kH/34bJ5+V1/VoUC888ilgvfAu ay7zZZiutTmvAgS2IB9mjNp6rv7gWjAzGIZafszWsUGU6uu38/IpoZOjKtJBjTI8 hovapT7PkzrAWvwdt/erQM+8PI7Ckqb53cHW2/gUn4irB3ENjKpwwXnXBlNgMveD L9aUNeg4vkO8U67j/IE8MBJOMCfLx7cB7gowMQhx8QCKR57mTEuZKOpH+xELcMIX XOZEjeDuVriEcn0sDf+dZUO51XJigvPzAC+dbquMXZsAjq3O83j/giQaV2MqHI5h QFVJYmprRi2hm0ZDhJ2fpiP8lXHQq4qfkpjg7QVScduUtSeRCu5XD7NQvHy9psg= =Mufy -----END PGP SIGNATURE----- --rNGqNJwJOu38vgJFqpat1DDn7EJvVrcOe--