From: Paolo Bonzini <pbonzini@redhat.com>
To: Alex Bligh <alex@alex.org.uk>, "Denis V. Lunev" <den@openvz.org>
Cc: "nbd-general@lists.sourceforge.net"
<nbd-general@lists.sourceforge.net>,
Kevin Wolf <kwolf@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Pavel Borzenkov <pborzenkov@virtuozzo.com>,
"Stefan stefanha@redhat. com" <stefanha@redhat.com>,
Wouter Verhelst <w@uter.be>
Subject: Re: [Qemu-devel] [PATCH v2 1/1] NBD proto: add WRITE_ZEROES extension
Date: Thu, 31 Mar 2016 15:55:54 +0200 [thread overview]
Message-ID: <56FD2C6A.9030208@redhat.com> (raw)
In-Reply-To: <24E4A85C-254F-4324-A2F4-9DACA6037381@alex.org.uk>
On 31/03/2016 15:53, Alex Bligh wrote:
>> > + If the flag `NBD_CMD_FLAG_MAY_TRIM` was set by the client in the command
>> > + flags field, the server MAY use trimming to zero out the area, but it
>> > + MUST ensure that the data reads back as zero.
>> > +
> Can you give an example of a situation where the client would not set this
> and it would be undesirable for the server to create a 'hole' using
> 'trim' type technology, even when the client doesn't specify it?
> I suspect there are already some backends (e.g. ceph on qemu-nbd) which
> will effectively do a 'trim' if you write 4k of zeroes even under
> current circumstances.
>
> IE why not always permit trimming PROVIDED the data always reads back
> as zero? This would be far simpler.
Because trimming can make future operations more expensive and cause
fragmentation (which may not be as bad as it used to be at the media
level, but it is still somewhat bad at the filesystem level).
So if you want a fully-provisioned file, the simplest way to do so is to
write zeroes to it, and trimming is undesirable.
Paolo
next prev parent reply other threads:[~2016-03-31 13:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 13:02 [Qemu-devel] [PATCH v2 1/1] NBD proto: add WRITE_ZEROES extension Denis V. Lunev
2016-03-31 13:53 ` Alex Bligh
2016-03-31 13:55 ` Paolo Bonzini [this message]
2016-03-31 14:27 ` Alex Bligh
2016-03-31 14:40 ` Paolo Bonzini
2016-03-31 14:08 ` Eric Blake
2016-03-31 23:46 ` Eric Blake
2016-04-01 8:37 ` [Qemu-devel] [Nbd] " Wouter Verhelst
2016-04-01 20:26 ` Eric Blake
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=56FD2C6A.9030208@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex@alex.org.uk \
--cc=den@openvz.org \
--cc=kwolf@redhat.com \
--cc=nbd-general@lists.sourceforge.net \
--cc=pborzenkov@virtuozzo.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=w@uter.be \
/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).