qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: Eric Blake <eblake@redhat.com>, Kevin Wolf <kwolf@redhat.com>,
	nbd-general@lists.sourceforge.net, qemu-block@nongnu.org,
	qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v5 13/14] nbd: Implement NBD_CMD_WRITE_ZEROES on server
Date: Wed, 20 Jul 2016 04:16:28 -0400 (EDT)	[thread overview]
Message-ID: <1514501603.8803202.1469002588620.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20160720073836.GF10539@ad.usersys.redhat.com>

> On Wed, 07/20 09:09, Paolo Bonzini wrote:
> > On 20/07/2016 06:37, Fam Zheng wrote:
> > > Yes, you are right about this, I was confused because "qemu-img map" does
> > > not
> > > report this allocation state after zero write. (No idea why SEEK_DATA
> > > doesn't
> > > hit the fallocate'ed area.)
> > 
> > Apparently it's because it's zeroed.
> > 
> > $ fallocate -z -o 10485760 -l 10485760 test
> > $ fallocate -p -o 49152000 -l 10485760 test
> > $ fallocate -o 49152000 -l 10485760 test
> > $ fallocate -p -o 65536000 -l 10485760 test
> > 
> > Now we have:
> > 
> > - a zero area at 10240K..20480K
> > 
> > - an hole+allocated area at 48000K..59240K
> > 
> > - a hole at 64000K..74240K
> > 
> > $ qemu-img map test
> > Offset          Length          Mapped to       File
> > 0               0xa00000        0               test    << ends at 10240K
> > 0x1400000       0x1ae0000       0x1400000       test    << ends at 48000K
> > 0x38e0000       0x5a0000        0x38e0000       test    << ends at 64000K
> > 0x4880000       0x1b80000       0x4880000       test
> 
> Hah? I'm apparently missing something. I can't see these entries:
> 
> > fam@ad:/var/tmp$ cat /tmp/sh
> > touch test
> > fallocate -z -o 10485760 -l 10485760 test
> > fallocate -p -o 49152000 -l 10485760 test
> > fallocate -o 49152000 -l 10485760 test
> > fallocate -p -o 65536000 -l 10485760 test
> > qemu-img map test
> > fam@ad:/var/tmp$ sh /tmp/sh
> > Offset          Length          Mapped to       File
> 
> (I'm using Fedora 24 but I've also tried RHEL 7.)

That was after a full allocation of a 1GB file.  I didn't copy that line
because I had the file lying around from another day--sorry.

Paolo

  reply	other threads:[~2016-07-20  8:16 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19  4:07 [Qemu-devel] [PATCH for-2.7 v5 00/14] nbd: efficient write zeroes Eric Blake
2016-07-19  4:07 ` [Qemu-devel] [PATCH v5 01/14] nbd: Fix bad flag detection on server Eric Blake
2016-07-19  4:07 ` [Qemu-devel] [PATCH v5 02/14] nbd: Add qemu-nbd -D for human-readable description Eric Blake
2016-07-19  4:07 ` [Qemu-devel] [PATCH v5 03/14] nbd: Limit nbdflags to 16 bits Eric Blake
2016-07-19  4:07 ` [Qemu-devel] [PATCH v5 04/14] nbd: Treat flags vs. command type as separate fields Eric Blake
2016-07-19  4:07 ` [Qemu-devel] [PATCH v5 05/14] nbd: Share common reply-sending code in server Eric Blake
2016-07-19  5:10   ` Fam Zheng
2016-07-19 14:52     ` Eric Blake
2016-07-20  4:39       ` Fam Zheng
2016-07-19  4:07 ` [Qemu-devel] [PATCH v5 06/14] nbd: Send message along with server NBD_REP_ERR errors Eric Blake
2016-07-19  5:15   ` Fam Zheng
2016-10-11 15:12     ` Eric Blake
2016-07-19  4:07 ` [Qemu-devel] [PATCH v5 07/14] nbd: Share common option-sending code in client Eric Blake
2016-07-19  5:31   ` Fam Zheng
2016-07-19  4:07 ` [Qemu-devel] [PATCH v5 08/14] nbd: Let server know when client gives up negotiation Eric Blake
2016-07-19  4:07 ` [Qemu-devel] [PATCH v5 09/14] nbd: Let client skip portions of server reply Eric Blake
2016-07-19  4:07 ` [Qemu-devel] [PATCH v5 10/14] nbd: Less allocation during NBD_OPT_LIST Eric Blake
2016-07-19  4:07 ` [Qemu-devel] [PATCH v5 11/14] nbd: Support shorter handshake Eric Blake
2016-07-19  4:07 ` [Qemu-devel] [PATCH v5 12/14] nbd: Improve server handling of shutdown requests Eric Blake
2016-07-19  4:08 ` [Qemu-devel] [PATCH v5 13/14] nbd: Implement NBD_CMD_WRITE_ZEROES on server Eric Blake
2016-07-19  6:21   ` Fam Zheng
2016-07-19 15:28     ` Eric Blake
2016-07-19 15:45       ` Paolo Bonzini
2016-07-20  3:34         ` Fam Zheng
2016-07-20  3:47           ` Eric Blake
2016-07-20  4:37             ` Fam Zheng
2016-07-20  7:09               ` Paolo Bonzini
2016-07-20  7:38                 ` Fam Zheng
2016-07-20  8:16                   ` Paolo Bonzini [this message]
2016-07-20  9:04                     ` Fam Zheng
2016-07-20  9:19                   ` [Qemu-devel] semantics of FIEMAP without FIEMAP_FLAG_SYNC (was Re: [PATCH v5 13/14] nbd: Implement NBD_CMD_WRITE_ZEROES on server) Paolo Bonzini
2016-07-20 12:30                     ` Dave Chinner
2016-07-20 13:35                       ` Niels de Vos
2016-07-21 11:43                         ` Dave Chinner
2016-07-21 12:31                           ` Pádraig Brady
2016-07-21 13:15                             ` Dave Chinner
2016-07-20 13:40                       ` Paolo Bonzini
2016-07-21 12:41                         ` Dave Chinner
2016-07-21 13:01                           ` Pádraig Brady
2016-07-21 14:23                           ` Paolo Bonzini
2016-07-22  8:58                             ` Dave Chinner
2016-07-22 10:41                               ` Paolo Bonzini
2018-02-15 16:40                                 ` Vladimir Sementsov-Ogievskiy
2018-02-15 16:42                                   ` Paolo Bonzini
2018-04-18 14:25                                     ` Vladimir Sementsov-Ogievskiy
2018-04-18 14:41                                       ` [Qemu-devel] semantics of FIEMAP without FIEMAP_FLAG_SYNC Eric Blake
2016-08-18 13:50   ` [Qemu-devel] [PATCH v5 13/14] nbd: Implement NBD_CMD_WRITE_ZEROES on server Vladimir Sementsov-Ogievskiy
2016-08-18 13:52     ` Paolo Bonzini
2016-07-19  4:08 ` [Qemu-devel] [PATCH v5 14/14] nbd: Implement NBD_CMD_WRITE_ZEROES on client Eric Blake
2016-07-19  6:24   ` Fam Zheng
2016-07-19 15:31     ` Eric Blake
2016-07-19  6:33 ` [Qemu-devel] [PATCH for-2.7 v5 00/14] nbd: efficient write zeroes Fam Zheng
2016-07-19  8:53 ` Paolo Bonzini
2016-07-19 15:33   ` Eric Blake
2016-07-19 15:41     ` Paolo Bonzini

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=1514501603.8803202.1469002588620.JavaMail.zimbra@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=nbd-general@lists.sourceforge.net \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@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 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).