qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Nigel Horne <njh@bandsman.co.uk>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Wipe patch
Date: Wed, 02 Aug 2006 08:39:57 +0100	[thread overview]
Message-ID: <44D056CD.9010702@bandsman.co.uk> (raw)
In-Reply-To: <fb249edb0608011949o366fca15m113b1c73af25dbb7@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1736 bytes --]

andrzej zaborowski wrote:
> On 02/08/06, Brad Campbell <brad@wasp.net.au> wrote:
>> ZIGLIO, Frediano, VF-IT wrote:
>> > Hi,
>> >   well, this is not a definitive patch but it works. The aim is to be
>> > able to wipe the disk without allocating entire space. When you wipe a
>> > disk the program fill disk with zero bytes so disk image increase to
>> > allocate all space. This just patch detect null byte writes and do not
>> > write all zero byte clusters.
>> >
>>
>> I've been giving this some pretty heavy testing over the last week 
>> and can say I've not noticed any
>> negative performance impact or any other adverse side effects, not to 
>> mention the speedup when doing
>> re-packing (which I do fairly regularly on both ext3 and ntfs guest 
>> filesystems).
>>
>> While I'm here does anyone know of a simple program, either dos or 
>> linux based for wiping unused
>> space on fat filesystems? The only ones I've found so far have been 
>> windows based.
>
> I don't know if you mean just zeroing unused parts or reordering the
> data and stuff like defragmentation. If you mean the former, there's a
> universal method:
>  dd if=/dev/zero of=xxx; rm xxx
> where xxx is a path to a new file on the filesystem, which must be
> mounted. It will creata a zero filled file there, which will fill all
It would be wise to sync as well, to ensure the zeros are actually written
and not stored in cache where the rm would remove them:

dd if=/dev/zero of=xxx; sync; rm xxx
> availiable space, and remove the file afterwards. I used this when I
> needed to send filesystem images through internet so that they
> compressed well.
> If you add dd=<a-big-number-here> it might take less time to write the 
> file.
>
>>

>
> Regards,


[-- Attachment #2: njh.vcf --]
[-- Type: text/x-vcard, Size: 173 bytes --]

begin:vcard
fn:Nigel Horne
n:Horne;Nigel
org:NJH Music
email;internet:njh@bandsman.co.uk
x-mozilla-html:FALSE
url:http://www.bandsman.co.uk
version:2.1
end:vcard


  parent reply	other threads:[~2006-08-02  7:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-26  8:23 [Qemu-devel] Wipe patch ZIGLIO, Frediano, VF-IT
2006-07-26  8:41 ` Brad Campbell
2006-07-26  9:19   ` Avi Kivity
2006-07-26  9:35     ` Brad Campbell
2006-08-02  2:25 ` Brad Campbell
2006-08-02  2:49   ` andrzej zaborowski
2006-08-02  2:51     ` andrzej zaborowski
2006-08-02  3:09       ` Brad Campbell
2006-08-02  7:39     ` Nigel Horne [this message]
2006-08-02 17:32   ` Andreas Bollhalder
  -- strict thread matches above, loose matches on Subject: below --
2006-07-26  8:48 ZIGLIO, Frediano, VF-IT
2006-07-26  9:42 ZIGLIO, Frediano, VF-IT
2006-07-26  9:52 ` Brad Campbell
2006-08-02 12:53 ZIGLIO, Frediano, VF-IT

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=44D056CD.9010702@bandsman.co.uk \
    --to=njh@bandsman.co.uk \
    --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).