[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061220081924.GA6783@amitarora.in.ibm.com>
Date: Wed, 20 Dec 2006 13:49:24 +0530
From: "Amit K. Arora" <aarora@...ux.vnet.ibm.com>
To: Eric Sandeen <sandeen@...hat.com>
Cc: linux-ext4@...r.kernel.org, suparna@...ibm.com, cmm@...ibm.com,
suzuki@...ibm.com, alex@...sterfs.com
Subject: Re: [RFC][Patch 2/2] Persistent preallocation in ext4
On Tue, Dec 19, 2006 at 03:23:41PM -0600, Eric Sandeen wrote:
> Andreas Dilger wrote:
> > On Dec 19, 2006 17:12 +0530, Amit K. Arora wrote:
> >> I wrote a simple tool to test these patches. The tool takes four
> >> arguments:
> >>
> >> * command: It may have either of the two values - "prealloc" or "write"
> >> * filename: This is the filename with relative path
> >> * offset: The offset within the file from where the preallocation, or
> >> the write should start.
> >> * length: Total number of bytes to be allocated/written from offset.
> >>
> >> Following cases were tested :
> >> 1. * preallocation from 0 to 32MB
> >> * write to various parts of the preallocated space in sets
> >> * observed that the extents get split and also get merged
> >>
> >> 2. * preallocate with holes at various places in the file
> >> * write to blocks starting from a hole and ending into preallocated
> >> blocks and vice-versa
> >> * try to write to entire set of blocks (i.e. from 0 to the last
> >> preallocated block) which has holes in between.
> >
> > An ideal test would be to modify fsx to (randomly) do preallocations
> > instead of truncates that increase the size.
>
> the fsx in the xfs qa suite already does this (albeit with the special
> xfs calls, of course)
Hmm... the fsx in xfs qa suite does preallocation, but _only_ at the
start of the testcase - i.e. only once. I guess what Andreas suggested is to
use random preallocations instead of random truncates. That will essentially
mean to call "doprealloc(size)" (which will preallocate size number of
bytes from start of the file), instead of dotruncate(size) in the
"test(void)" function; when fsx is passed with a relevant option (say
"-x"). Am I right ?
BTW, I plan to modify the fsx-linux.c in LTP for this. Will update on
how it goes...
>
> But it might be worth looking at as a starting point, and also maybe to
> keep the options and behavior similar to one* version of fsx that is out
> there. :)
Yes, it will be nice to keep the behavior and the option same here.
>
> http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfstests/ltp/fsx.c?rev=1.7
>
> -Eric
>
> *http://kernelslacker.livejournal.com/?skip=43
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists