All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Novotny <minovotn@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "'xen-devel@lists.xensource.com'" <xen-devel@lists.xensource.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [PATCH] Introduce dom0-min-space configuration option
Date: Mon, 26 Jul 2010 13:21:31 +0200	[thread overview]
Message-ID: <4C4D6FBB.6040703@redhat.com> (raw)
In-Reply-To: <4C4D6F06.6090509@redhat.com>

On 07/26/2010 01:18 PM, Paolo Bonzini wrote:
> On 07/26/2010 12:36 PM, Michal Novotny wrote:
>> On 07/26/2010 11:59 AM, Paolo Bonzini wrote:
>>> On 07/26/2010 08:55 AM, Michal Novotny wrote:
>>>> Or do you think that we should alter the message in gunzip function to
>>>> say that there's an error in data stream (premature end of data 
>>>> stream)
>>>> and that user should check for enough space on dom0?
>>>
>>> No, the gunzip function (in libxc, if I understood the context) should
>>> not even be called if pygrub could not write the file. Instead, it
>>> should print something like
>>>
>>> pygrub: No space left on device
>>>
>>> and exit. There's absolutely no error checking here:
>>>
>>> data = fs.open_file(chosencfg["kernel"]).read()
>>> (tfd, bootcfg["kernel"]) = tempfile.mkstemp(prefix="boot_kernel.",
>>> dir="/var/run/xend/boot")
>>> os.write(tfd, data)
>>> os.close(tfd)
>>>
>>> (and likewise for initrd) and that's the bug.
>>>
>>> Paolo
>>
>> Paolo, that's correct but the issue here is that we don't know until we
>> extract it from image file.
>
> os.write would return -1 and set errno to ENOSPC (besides, any other 
> errno should get the same treatment), no?
>
> Paolo
Maybe, I need to check the docs first but you're most likely right about 
this. Nevertheless this is the pygrub code AFAIK so some patch for xend 
would be necessary as well, otherwise libvirt-based tools would complain 
with "Boot loader didn't return any data!" message.

Michal

-- 
Michal Novotny<minovotn@redhat.com>, RHCE
Virtualization Team (xen userspace), Red Hat

  reply	other threads:[~2010-07-26 11:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-12 18:07 [PATCH] Introduce dom0-min-space configuration option Michal Novotny
2010-07-13 18:02 ` Ian Jackson
2010-07-14 11:23   ` Michal Novotny
2010-07-21  3:52     ` Michal Novotny
2010-07-21 13:25     ` Ian Jackson
2010-07-22  7:50       ` Michal Novotny
2010-07-22  7:52         ` Michal Novotny
2010-07-23 16:00         ` Ian Jackson
2010-07-26  6:55           ` Michal Novotny
2010-07-26  9:59             ` Paolo Bonzini
2010-07-26 10:36               ` Michal Novotny
2010-07-26 11:18                 ` Paolo Bonzini
2010-07-26 11:21                   ` Michal Novotny [this message]
2010-07-26 11:31                     ` Paolo Bonzini
2010-07-26 11:48                       ` Michal Novotny
2010-07-26 12:23                         ` Paolo Bonzini
2010-07-26 12:48                           ` Michal Novotny

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=4C4D6FBB.6040703@redhat.com \
    --to=minovotn@redhat.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=pbonzini@redhat.com \
    --cc=xen-devel@lists.xensource.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 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.