qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Stefan Hajnoczi <stefanha@gmail.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/3] block: Warn about usage of growing formats over non-growable protocols
Date: Wed, 06 May 2015 18:37:29 +0200	[thread overview]
Message-ID: <554A4349.10301@redhat.com> (raw)
In-Reply-To: <554A3F37.9080704@redhat.com>

On 06.05.2015 18:20, Paolo Bonzini wrote:
>
> On 06/05/2015 18:12, Max Reitz wrote:
>> I very much think it would be worth fixing, if there wasn't the problem
>> with legitimate use cases throwing unnecessary warnings.
> Right.
>
>> I remember having a discussion with Kevin about this series (v1)
>> regarding qcow2 on LVM; I think my point was that the warning is
>> basically still correct, or only needs rewording (oops, I guess I did
>> forget that in v2). If you are using qcow2 on LVM, you need to know
>> exactly what you are doing, so a warning about this is indeed
>> appropriate (in my opinion, that is).
> There's another thing to check.  In the BZ you linked you got an EINVAL
> or EIO.  Why didn't you get an ENOSPC?

Because qcow2 tries to write beyond the end of the file; the NBD client 
implementation passes that on to the server, and the server simply 
reports an error (which the NBD client turns into EIO).

We could make the NBD client detect this condition and report ENOSPC 
immediately. But I don't think this would improve matters, for people 
would then complain "Linux reports 'no space left on device' in qemu, 
while df reports that there is enough space available". It's the same 
thing, people don't know what they're doing and nobody warned them that 
what they are doing might be wrong.

> Can you check if virtio-scsi
> gives ENOSPC?

In which configuration? Using virtio-scsi on top of qcow2 on top of some 
SCSI passthrough block driver?

> If so, you could perhaps only warn for werror=report.  But even then,
> there are legitimate cases where you want the guest to see the ENOSPC.
> In fact, that's the reason why virtio-scsi converts ENOSPC to a SCSI
> "SPACE ALLOCATION FAILED" sense code. :)

Sounds like we ought to make NBD return ENOSPC no matter the fate of 
this series.

The problem with only warning for a certain non-default configuration is 
that people who don't know what they are doing are more likely to use 
the default configuration, so I'd like the warning to appear then.

>> So I think if we can word the warning in a way to make it clear that
>> there are legitimate use cases, but you need to know what you are doing,
>> I think it's worth having this warning. Users who know what they're
>> doing won't be surprised or at least will know what it means, while
>> users who don't know what it means most probably don't know what they're
>> doing and thus the warning is appropriate for them.
> I don't know...  But then, I'm not a maintainer of this code. :)

Well, this is not about this code in particular, but more about qemu's 
interface design in general, so I'm grateful about any opinion on it. :-)

Max

  reply	other threads:[~2015-05-06 16:37 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-19 19:03 [Qemu-devel] [PATCH v2 0/3] block: Warn about usage of growing formats over non-growable protocols Max Reitz
2015-03-19 19:03 ` [Qemu-devel] [PATCH v2 1/3] iotests: Make nested read in 072 and 089 read-only Max Reitz
2015-03-19 19:23   ` Eric Blake
2015-03-19 19:03 ` [Qemu-devel] [PATCH v2 2/3] block: Introduce BDS.growing Max Reitz
2015-03-19 20:11   ` Eric Blake
2015-03-19 19:03 ` [Qemu-devel] [PATCH v2 3/3] block: Introduce BlockDriver.requires_growing_file Max Reitz
2015-03-19 20:18   ` Eric Blake
2015-05-05  9:46 ` [Qemu-devel] [PATCH v2 0/3] block: Warn about usage of growing formats over non-growable protocols Stefan Hajnoczi
2015-05-06 13:04   ` Max Reitz
2015-05-06 15:30     ` Paolo Bonzini
2015-05-06 16:12       ` [Qemu-devel] [Qemu-block] " Max Reitz
2015-05-06 16:20         ` Paolo Bonzini
2015-05-06 16:37           ` Max Reitz [this message]
2015-05-06 16:47             ` Paolo Bonzini
2015-05-06 17:23               ` Max Reitz
2015-05-07 12:20                 ` Paolo Bonzini
2015-05-07 12:29                   ` Kevin Wolf
2015-05-07 12:47                     ` Paolo Bonzini
2015-05-07 13:20                       ` Kevin Wolf
2015-05-07 13:55                         ` Paolo Bonzini
2015-05-07 14:07                           ` Kevin Wolf
2015-05-07 14:16                             ` Paolo Bonzini
2015-05-07 14:34                               ` Kevin Wolf
2015-05-07 14:50                                 ` Paolo Bonzini
2015-05-08 10:08                                   ` Kevin Wolf
2015-05-08 10:16                                     ` Paolo Bonzini
2015-05-08 10:34                                       ` Kevin Wolf
2015-05-08 11:00                                         ` Paolo Bonzini
2015-05-08 12:58                                     ` Max Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=554A4349.10301@redhat.com \
    --to=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).