All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-stable@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/2] block/file-posix: Fix fully preallocated truncate
Date: Wed, 28 Feb 2018 08:22:37 -0600	[thread overview]
Message-ID: <e5b4f75c-6dbf-c5cc-8463-f28bb48d3956@redhat.com> (raw)
In-Reply-To: <20180228131315.30194-1-mreitz@redhat.com>

On 02/28/2018 07:13 AM, Max Reitz wrote:
> Fully preallocated truncation has a 50 % chance of working on images
> files over file-posix.  It works if $SIZE % 4G < 2G, and it fails
> otherwise.  To make things even more interesting, often you would not
> even notice because qemu reported success even though it did nothing
> (because after the successful lseek(), errno was still 0, so when the
> file-posix driver tried to return a negative error code, it actually
> reported success).
> 
> This issue is fixed by patch 1 in this series.  Thanks to Daniel for
> reporting!
> 
> 
> Max Reitz (2):
>    block/file-posix: Fix fully preallocated truncate
>    iotests: Test preallocated truncate of 2G image

Good catch.  Series:
Reviewed-by: Eric Blake <eblake@redhat.com>

gluster.c has similar code, but it assigns glfs_lseek() to an int64_t, 
so it does not have the bug.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

  parent reply	other threads:[~2018-02-28 14:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 13:13 [Qemu-devel] [PATCH 0/2] block/file-posix: Fix fully preallocated truncate Max Reitz
2018-02-28 13:13 ` [Qemu-devel] [PATCH 1/2] " Max Reitz
2018-02-28 13:34   ` Daniel P. Berrangé
2018-02-28 13:45     ` Max Reitz
2018-02-28 13:53       ` Daniel P. Berrangé
2018-02-28 13:55         ` Max Reitz
2018-02-28 13:59           ` Daniel P. Berrangé
2018-02-28 14:20         ` Eric Blake
2018-02-28 13:58   ` Daniel P. Berrangé
2018-02-28 13:13 ` [Qemu-devel] [PATCH 2/2] iotests: Test preallocated truncate of 2G image Max Reitz
2018-02-28 14:02   ` Daniel P. Berrangé
2018-02-28 14:22 ` Eric Blake [this message]
2018-03-26 20:30 ` [Qemu-devel] [PATCH 0/2] block/file-posix: Fix fully preallocated truncate 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=e5b4f75c-6dbf-c5cc-8463-f28bb48d3956@redhat.com \
    --to=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /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.