From: Paolo Bonzini <pbonzini@redhat.com>
To: Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Peter Lieven <pl@kamp.de>,
qemu-block@nongnu.org, Ronnie Sahlberg <ronniesahlberg@gmail.com>
Subject: Re: [Qemu-devel] [PATCH 0/2] Fix werror=enospc for qcow2 on iscsi
Date: Thu, 22 Oct 2015 10:45:06 +0200 [thread overview]
Message-ID: <5628A212.5040607@redhat.com> (raw)
In-Reply-To: <1445501858-18790-1-git-send-email-famz@redhat.com>
On 22/10/2015 10:17, Fam Zheng wrote:
> When qcow2 is created on iscsi target with a virtual size greater than physical
> capacity of the LUN, over time it's possible that guest fills too much data and
> at that point, new clusters in qcow2 will be allocated beyond the end of disk.
>
> werror=enospc is useful for that purpose to allocate more data for the guest,
> except in this case, unlike a host file system, iscsi returns -EIO instead of
> -ENOSPC, which makes it hard to detect and report proper error.
>
> Fix this by improving iscsi error handling code to return meaningful error
> codes (-ERANGE here), then further translate it to -ENOSPC in qcow2.
FWIW, Linux uses ENOSPC if it detects out of range LBAs:
if (iocb->ki_pos >= size)
return -ENOSPC;
so I think it's okay to convert LBA_OUT_OF_RANGE to ENOSPC directly and
avoid patch 2.
Paolo
next prev parent reply other threads:[~2015-10-22 8:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 8:17 [Qemu-devel] [PATCH 0/2] Fix werror=enospc for qcow2 on iscsi Fam Zheng
2015-10-22 8:17 ` [Qemu-devel] [PATCH 1/2] iscsi: Translate scsi sense into error code Fam Zheng
2015-10-22 8:31 ` Peter Lieven
2015-10-22 8:45 ` Paolo Bonzini
2015-10-22 9:11 ` Peter Lieven
2015-10-22 9:51 ` Fam Zheng
2015-10-22 9:56 ` Paolo Bonzini
2015-10-22 9:11 ` Kevin Wolf
2015-10-22 8:17 ` [Qemu-devel] [PATCH 2/2] qcow2: Translate -ERANGE to -ENOSPC Fam Zheng
2015-10-22 8:32 ` [Qemu-devel] [PATCH 0/2] Fix werror=enospc for qcow2 on iscsi Peter Lieven
2015-10-22 10:06 ` Fam Zheng
2015-10-22 8:45 ` Paolo Bonzini [this message]
2015-10-22 9:03 ` Kevin Wolf
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=5628A212.5040607@redhat.com \
--to=pbonzini@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=ronniesahlberg@gmail.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).