Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Sep 2005 21:19:52 +1000
From:      Peter Jeremy <PeterJeremy@optushome.com.au>
To:        Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>
Cc:        cvs-src@freebsd.org, Mike Silbersack <silby@silby.com>, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/fs/msdosfs msdosfs_denode.c
Message-ID:  <20050908111952.GC26550@cirb503493.alcatel.com.au>
In-Reply-To: <20050908094705.R19771@atlantis.atlantis.dp.ua>
References:  <20050908094705.R19771@atlantis.atlantis.dp.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2005-Sep-08 10:06:14 +0300, Dmitry Pryanishnikov wrote:
>it would be possible to keep this disk image as a regression test for
>this particular bug (it could be compressed just fine ;).

Compressing 4GB of NULs takes ~100 seconds on an Athlon XP-1800 and
the result occupies 4MB.  Uncompressing is about twice as fast but
that's still 50 seconds to wait to read the second directory.

I'd suggest keeping it as an uncompressed sparse file instead.  That
will be smaller than a compressed file (two real blocks - one at
offset zero and the other at 4GB - about 32K + a couple of indirect
blocks).  You just need to be very careful about copying it.
Accessing the directories is virtually instantaneous because there's
no decompression.

BTW, this is one case where you can compress compressed files - the
smallest file is 783 bytes with 4GB NULs | gzip | gzip | gzip | wc.
-- 
Peter Jeremy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050908111952.GC26550>