All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.10] Revert "block/io: Comment out permission assertions"
@ 2017-04-11 15:52 Max Reitz
  2017-04-11 16:32 ` Fam Zheng
  2017-04-13 13:28 ` Stefan Hajnoczi
  0 siblings, 2 replies; 6+ messages in thread
From: Max Reitz @ 2017-04-11 15:52 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf, Stefan Hajnoczi, Fam Zheng

This reverts commit e3e0003a8f6570aba1421ef99a0b383a43371a74.

This commit was necessary for the 2.9 release because we were unable to
fix the underlying issue(s) in time. However, we will be for 2.10.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 block.c    |  6 +-----
 block/io.c | 12 ++----------
 2 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/block.c b/block.c
index 1fbbb8d606..086a12df97 100644
--- a/block.c
+++ b/block.c
@@ -3274,11 +3274,7 @@ int bdrv_truncate(BdrvChild *child, int64_t offset)
     BlockDriver *drv = bs->drv;
     int ret;
 
-    /* FIXME: Some format block drivers use this function instead of implicitly
-     *        growing their file by writing beyond its end.
-     *        See bdrv_aligned_pwritev() for an explanation why we currently
-     *        cannot assert this permission in that case. */
-    // assert(child->perm & BLK_PERM_RESIZE);
+    assert(child->perm & BLK_PERM_RESIZE);
 
     if (!drv)
         return -ENOMEDIUM;
diff --git a/block/io.c b/block/io.c
index 8706bfa578..bae6947032 100644
--- a/block/io.c
+++ b/block/io.c
@@ -1345,16 +1345,8 @@ static int coroutine_fn bdrv_aligned_pwritev(BdrvChild *child,
     assert(!waited || !req->serialising);
     assert(req->overlap_offset <= offset);
     assert(offset + bytes <= req->overlap_offset + req->overlap_bytes);
-    /* FIXME: Block migration uses the BlockBackend of the guest device at a
-     *        point when it has not yet taken write permissions. This will be
-     *        fixed by a future patch, but for now we have to bypass this
-     *        assertion for block migration to work. */
-    // assert(child->perm & BLK_PERM_WRITE);
-    /* FIXME: Because of the above, we also cannot guarantee that all format
-     *        BDS take the BLK_PERM_RESIZE permission on their file BDS, since
-     *        they are not obligated to do so if they do not have any parent
-     *        that has taken the permission to write to them. */
-    // assert(end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE);
+    assert(child->perm & BLK_PERM_WRITE);
+    assert(end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE);
 
     ret = notifier_with_return_list_notify(&bs->before_write_notifiers, req);
 
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.10] Revert "block/io: Comment out permission assertions"
  2017-04-11 15:52 [Qemu-devel] [PATCH for-2.10] Revert "block/io: Comment out permission assertions" Max Reitz
@ 2017-04-11 16:32 ` Fam Zheng
  2017-04-13 13:28 ` Stefan Hajnoczi
  1 sibling, 0 replies; 6+ messages in thread
From: Fam Zheng @ 2017-04-11 16:32 UTC (permalink / raw)
  To: Max Reitz; +Cc: qemu-block, Kevin Wolf, qemu-devel, Stefan Hajnoczi

On Tue, 04/11 17:52, Max Reitz wrote:
> This reverts commit e3e0003a8f6570aba1421ef99a0b383a43371a74.
> 
> This commit was necessary for the 2.9 release because we were unable to
> fix the underlying issue(s) in time. However, we will be for 2.10.
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>  block.c    |  6 +-----
>  block/io.c | 12 ++----------
>  2 files changed, 3 insertions(+), 15 deletions(-)
> 
> diff --git a/block.c b/block.c
> index 1fbbb8d606..086a12df97 100644
> --- a/block.c
> +++ b/block.c
> @@ -3274,11 +3274,7 @@ int bdrv_truncate(BdrvChild *child, int64_t offset)
>      BlockDriver *drv = bs->drv;
>      int ret;
>  
> -    /* FIXME: Some format block drivers use this function instead of implicitly
> -     *        growing their file by writing beyond its end.
> -     *        See bdrv_aligned_pwritev() for an explanation why we currently
> -     *        cannot assert this permission in that case. */
> -    // assert(child->perm & BLK_PERM_RESIZE);
> +    assert(child->perm & BLK_PERM_RESIZE);
>  
>      if (!drv)
>          return -ENOMEDIUM;
> diff --git a/block/io.c b/block/io.c
> index 8706bfa578..bae6947032 100644
> --- a/block/io.c
> +++ b/block/io.c
> @@ -1345,16 +1345,8 @@ static int coroutine_fn bdrv_aligned_pwritev(BdrvChild *child,
>      assert(!waited || !req->serialising);
>      assert(req->overlap_offset <= offset);
>      assert(offset + bytes <= req->overlap_offset + req->overlap_bytes);
> -    /* FIXME: Block migration uses the BlockBackend of the guest device at a
> -     *        point when it has not yet taken write permissions. This will be
> -     *        fixed by a future patch, but for now we have to bypass this
> -     *        assertion for block migration to work. */
> -    // assert(child->perm & BLK_PERM_WRITE);
> -    /* FIXME: Because of the above, we also cannot guarantee that all format
> -     *        BDS take the BLK_PERM_RESIZE permission on their file BDS, since
> -     *        they are not obligated to do so if they do not have any parent
> -     *        that has taken the permission to write to them. */
> -    // assert(end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE);
> +    assert(child->perm & BLK_PERM_WRITE);
> +    assert(end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE);
>  
>      ret = notifier_with_return_list_notify(&bs->before_write_notifiers, req);
>  
> -- 
> 2.12.2
> 
> 

Acked-by: Fam Zheng <famz@redhat.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.10] Revert "block/io: Comment out permission assertions"
  2017-04-11 15:52 [Qemu-devel] [PATCH for-2.10] Revert "block/io: Comment out permission assertions" Max Reitz
  2017-04-11 16:32 ` Fam Zheng
@ 2017-04-13 13:28 ` Stefan Hajnoczi
  2017-04-13 14:34   ` Max Reitz
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Hajnoczi @ 2017-04-13 13:28 UTC (permalink / raw)
  To: Max Reitz; +Cc: qemu-block, qemu-devel, Kevin Wolf, Fam Zheng

[-- Attachment #1: Type: text/plain, Size: 2773 bytes --]

On Tue, Apr 11, 2017 at 05:52:26PM +0200, Max Reitz wrote:
> This reverts commit e3e0003a8f6570aba1421ef99a0b383a43371a74.
> 
> This commit was necessary for the 2.9 release because we were unable to
> fix the underlying issue(s) in time. However, we will be for 2.10.
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>  block.c    |  6 +-----
>  block/io.c | 12 ++----------
>  2 files changed, 3 insertions(+), 15 deletions(-)

Should we merge a fix before enabling the assertion again?  It's a known
issue.  Let people using qemu.git live a little and have fun without the
inevitable SIGABRT coredumps.  We don't benefit if more people encounter
this crash and duplicate work debugging it.

> diff --git a/block.c b/block.c
> index 1fbbb8d606..086a12df97 100644
> --- a/block.c
> +++ b/block.c
> @@ -3274,11 +3274,7 @@ int bdrv_truncate(BdrvChild *child, int64_t offset)
>      BlockDriver *drv = bs->drv;
>      int ret;
>  
> -    /* FIXME: Some format block drivers use this function instead of implicitly
> -     *        growing their file by writing beyond its end.
> -     *        See bdrv_aligned_pwritev() for an explanation why we currently
> -     *        cannot assert this permission in that case. */
> -    // assert(child->perm & BLK_PERM_RESIZE);
> +    assert(child->perm & BLK_PERM_RESIZE);
>  
>      if (!drv)
>          return -ENOMEDIUM;
> diff --git a/block/io.c b/block/io.c
> index 8706bfa578..bae6947032 100644
> --- a/block/io.c
> +++ b/block/io.c
> @@ -1345,16 +1345,8 @@ static int coroutine_fn bdrv_aligned_pwritev(BdrvChild *child,
>      assert(!waited || !req->serialising);
>      assert(req->overlap_offset <= offset);
>      assert(offset + bytes <= req->overlap_offset + req->overlap_bytes);
> -    /* FIXME: Block migration uses the BlockBackend of the guest device at a
> -     *        point when it has not yet taken write permissions. This will be
> -     *        fixed by a future patch, but for now we have to bypass this
> -     *        assertion for block migration to work. */
> -    // assert(child->perm & BLK_PERM_WRITE);
> -    /* FIXME: Because of the above, we also cannot guarantee that all format
> -     *        BDS take the BLK_PERM_RESIZE permission on their file BDS, since
> -     *        they are not obligated to do so if they do not have any parent
> -     *        that has taken the permission to write to them. */
> -    // assert(end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE);
> +    assert(child->perm & BLK_PERM_WRITE);
> +    assert(end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE);
>  
>      ret = notifier_with_return_list_notify(&bs->before_write_notifiers, req);
>  
> -- 
> 2.12.2
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.10] Revert "block/io: Comment out permission assertions"
  2017-04-13 13:28 ` Stefan Hajnoczi
@ 2017-04-13 14:34   ` Max Reitz
  2017-04-14  1:10     ` [Qemu-devel] [Qemu-block] " John Snow
  0 siblings, 1 reply; 6+ messages in thread
From: Max Reitz @ 2017-04-13 14:34 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-block, qemu-devel, Kevin Wolf, Fam Zheng

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

On 13.04.2017 15:28, Stefan Hajnoczi wrote:
> On Tue, Apr 11, 2017 at 05:52:26PM +0200, Max Reitz wrote:
>> This reverts commit e3e0003a8f6570aba1421ef99a0b383a43371a74.
>>
>> This commit was necessary for the 2.9 release because we were unable to
>> fix the underlying issue(s) in time. However, we will be for 2.10.
>>
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>>  block.c    |  6 +-----
>>  block/io.c | 12 ++----------
>>  2 files changed, 3 insertions(+), 15 deletions(-)
> 
> Should we merge a fix before enabling the assertion again?  It's a known
> issue.  Let people using qemu.git live a little and have fun without the
> inevitable SIGABRT coredumps.  We don't benefit if more people encounter
> this crash and duplicate work debugging it.

Yes, we should probably merge the fixes we know about before. But after
that, I'd rather merge this patch as soon as possible so we do have a
chance of getting more reports (if anything else is broken) before the
next freeze. :-)

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [Qemu-block] [PATCH for-2.10] Revert "block/io: Comment out permission assertions"
  2017-04-13 14:34   ` Max Reitz
@ 2017-04-14  1:10     ` John Snow
  2017-04-14  6:46       ` Stefan Hajnoczi
  0 siblings, 1 reply; 6+ messages in thread
From: John Snow @ 2017-04-14  1:10 UTC (permalink / raw)
  To: Max Reitz, Stefan Hajnoczi; +Cc: Kevin Wolf, Fam Zheng, qemu-devel, qemu-block



On 04/13/2017 10:34 AM, Max Reitz wrote:
> On 13.04.2017 15:28, Stefan Hajnoczi wrote:
>> On Tue, Apr 11, 2017 at 05:52:26PM +0200, Max Reitz wrote:
>>> This reverts commit e3e0003a8f6570aba1421ef99a0b383a43371a74.
>>>
>>> This commit was necessary for the 2.9 release because we were unable to
>>> fix the underlying issue(s) in time. However, we will be for 2.10.
>>>
>>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>>> ---
>>>  block.c    |  6 +-----
>>>  block/io.c | 12 ++----------
>>>  2 files changed, 3 insertions(+), 15 deletions(-)
>>
>> Should we merge a fix before enabling the assertion again?  It's a known
>> issue.  Let people using qemu.git live a little and have fun without the
>> inevitable SIGABRT coredumps.  We don't benefit if more people encounter
>> this crash and duplicate work debugging it.
> 
> Yes, we should probably merge the fixes we know about before. But after
> that, I'd rather merge this patch as soon as possible so we do have a
> chance of getting more reports (if anything else is broken) before the
> next freeze. :-)
> 
> Max
> 

It's nice to have a working tree, but I think Max has a good point about
wanting to see the reports sooner rather than later, especially if we
want to roll a 2.9.1 very shortly after release.

(Which I think we should.)

--js

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [Qemu-block] [PATCH for-2.10] Revert "block/io: Comment out permission assertions"
  2017-04-14  1:10     ` [Qemu-devel] [Qemu-block] " John Snow
@ 2017-04-14  6:46       ` Stefan Hajnoczi
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2017-04-14  6:46 UTC (permalink / raw)
  To: John Snow
  Cc: Max Reitz, Stefan Hajnoczi, Kevin Wolf, Fam Zheng, qemu-devel,
	qemu block

On Fri, Apr 14, 2017 at 2:10 AM, John Snow <jsnow@redhat.com> wrote:
> On 04/13/2017 10:34 AM, Max Reitz wrote:
>> On 13.04.2017 15:28, Stefan Hajnoczi wrote:
>>> On Tue, Apr 11, 2017 at 05:52:26PM +0200, Max Reitz wrote:
>>>> This reverts commit e3e0003a8f6570aba1421ef99a0b383a43371a74.
>>>>
>>>> This commit was necessary for the 2.9 release because we were unable to
>>>> fix the underlying issue(s) in time. However, we will be for 2.10.
>>>>
>>>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>>>> ---
>>>>  block.c    |  6 +-----
>>>>  block/io.c | 12 ++----------
>>>>  2 files changed, 3 insertions(+), 15 deletions(-)
>>>
>>> Should we merge a fix before enabling the assertion again?  It's a known
>>> issue.  Let people using qemu.git live a little and have fun without the
>>> inevitable SIGABRT coredumps.  We don't benefit if more people encounter
>>> this crash and duplicate work debugging it.
>>
>> Yes, we should probably merge the fixes we know about before. But after
>> that, I'd rather merge this patch as soon as possible so we do have a
>> chance of getting more reports (if anything else is broken) before the
>> next freeze. :-)
>>
>> Max
>>
>
> It's nice to have a working tree, but I think Max has a good point about
> wanting to see the reports sooner rather than later, especially if we
> want to roll a 2.9.1 very shortly after release.
>
> (Which I think we should.)

I interpreted Max's reply to mean "okay, let's merge a fix first and
then immediately enable the assertion again".

Your reply seems to interpret Max's email as "the assertion might
catch other bugs so it should be enabled immediately without a fix".

Those two are not the same :).

Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-14  6:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11 15:52 [Qemu-devel] [PATCH for-2.10] Revert "block/io: Comment out permission assertions" Max Reitz
2017-04-11 16:32 ` Fam Zheng
2017-04-13 13:28 ` Stefan Hajnoczi
2017-04-13 14:34   ` Max Reitz
2017-04-14  1:10     ` [Qemu-devel] [Qemu-block] " John Snow
2017-04-14  6:46       ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.