From: Eric Blake <eblake@redhat.com>
To: Fam Zheng <famz@redhat.com>, John Snow <jsnow@redhat.com>
Cc: kwolf@redhat.com, qemu-block@nongnu.org, jcody@redhat.com,
qemu-devel@nongnu.org, armbru@redhat.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 2/3] block/backup: avoid copying less than full target clusters
Date: Tue, 23 Feb 2016 17:45:44 -0700 [thread overview]
Message-ID: <56CCFD38.5040704@redhat.com> (raw)
In-Reply-To: <20160224002757.GA749@ad.usersys.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1737 bytes --]
On 02/23/2016 05:27 PM, Fam Zheng wrote:
> On Tue, 02/23 19:17, John Snow wrote:
>> During incremental backups, if the target has a cluster size that is
>> larger than the backup cluster size and we are backing up to a target
>> that cannot (for whichever reason) pull clusters up from a backing image,
>> we may inadvertantly create unusable incremental backup images.
>>
>> + /* If there is no backing file on the target, we cannot rely on COW if our
>> + * backup cluster size is smaller than the target cluster size. Even for
>> + * targets with a backing file, try to avoid COW if possible. */
>> + ret = bdrv_get_info(job->target, &bdi);
>> + if (ret < 0 && !target->backing) {
>> + error_setg_errno(errp, -ret,
>> + "Can't determine cluster size of target that has no backing file. "
>> + "This may create an unusable destination image. Aborting.");
>
> Most error messages don't end with a period, but that's not a hard rule AFAICT.
Ah, but it is:
include/qapi/error.h:
* The resulting message should be a single phrase, with no newline or
* trailing punctuation.
* Please don't error_setg(&error_fatal, ...), use error_report() and
* exit(), because that's more obvious.
* Likewise, don't error_setg(&error_abort, ...), use assert().
*/
#define error_setg(errp, fmt, ...) \
The error message should be "Can't determine cluster size of target
without backing file"; everything else should be done with
error_append_hint(&errp, "Aborting, since this may create an unusable
destination image\n")
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-02-24 0:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 0:16 [Qemu-devel] [PATCH v3 0/3] blockjob: correct backup cluster size for backups John Snow
2016-02-24 0:16 ` [Qemu-devel] [PATCH v3 1/3] block/backup: make backup cluster size configurable John Snow
2016-02-24 0:17 ` [Qemu-devel] [PATCH v3 2/3] block/backup: avoid copying less than full target clusters John Snow
2016-02-24 0:27 ` Fam Zheng
2016-02-24 0:42 ` John Snow
2016-02-24 0:45 ` Eric Blake [this message]
2016-02-24 0:52 ` John Snow
2016-02-24 16:49 ` Eric Blake
2016-02-24 0:17 ` [Qemu-devel] [PATCH v3 3/3] iotests/124: Add cluster_size mismatch test John Snow
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=56CCFD38.5040704@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=famz@redhat.com \
--cc=jcody@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--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).