From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Nir Soffer <nsoffer@redhat.com>, Kevin Wolf <kwolf@redhat.com>,
Thomas Huth <thuth@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3] iotests: Filter 175's allocation information
Date: Wed, 29 May 2019 15:39:27 +0200 [thread overview]
Message-ID: <b6992c89-a1bd-ad90-e6a9-c6669b7e91cf@redhat.com> (raw)
In-Reply-To: <20190516144319.12570-1-mreitz@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]
On 16.05.19 16:43, Max Reitz wrote:
> It is possible for an empty file to take up blocks on a filesystem, for
> example:
>
> $ qemu-img create -f raw test.img 1G
> Formatting 'test.img', fmt=raw size=1073741824
> $ mkfs.ext4 -I 128 -q test.img
> $ mkdir test-mount
> $ sudo mount -o loop test.img test-mount
> $ sudo touch test-mount/test-file
> $ stat -c 'blocks=%b' test-mount/test-file
> blocks=8
>
> These extra blocks (one cluster) are apparently used for metadata,
> because they are always there, on top of blocks used for data:
>
> $ sudo dd if=/dev/zero of=test-mount/test-file bs=1M count=1
> 1+0 records in
> 1+0 records out
> 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00135339 s, 775 MB/s
> $ stat -c 'blocks=%b' test-mount/test-file
> blocks=2056
>
> Make iotest 175 take this into account.
>
> Reported-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> Reviewed-by: Nir Soffer <nsoffer@redhat.com>
> ---
> v3:
> - Actually tested this on an FS with the behavior in question and
> noticed the patterns were lacking a $. Since I'm now sending a v3
> anyway, I might as well fix it with the heavy hammer and make it a
> ($|[^0-9]).
> - Added example configuration to the commit message [Nir]
> - Kept the R-bs because I didn't feel too bad about doing so.
> ---
> tests/qemu-iotests/175 | 26 ++++++++++++++++++++++----
> tests/qemu-iotests/175.out | 8 ++++----
> 2 files changed, 26 insertions(+), 8 deletions(-)
Applied to my block branch.
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2019-05-29 13:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-16 14:43 [Qemu-devel] [PATCH v3] iotests: Filter 175's allocation information Max Reitz
2019-05-29 13:39 ` Max Reitz [this message]
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=b6992c89-a1bd-ad90-e6a9-c6669b7e91cf@redhat.com \
--to=mreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=nsoffer@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@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).