[Top] [All Lists]

Re: [RFC] btree test harness

To: Christoph Hellwig <hch@xxxxxx>
Subject: Re: [RFC] btree test harness
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 14 Aug 2008 10:57:55 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20080813223022.GA15025@xxxxxx>
Mail-followup-to: Christoph Hellwig <hch@xxxxxx>, xfs@xxxxxxxxxxx
References: <20080813223022.GA15025@xxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
On Thu, Aug 14, 2008 at 12:30:22AM +0200, Christoph Hellwig wrote:
> To excercise the btree code a harness that looks at the corner cases
> would be helpful, and with the generic btree code it's now possible
> to implement one.  This patch is based on WIP code from Dave Chinner
> but had to be largely rewritten.
> The idea is that we have a btree that is there just standalone and
> not integrated in the rest of the filesystem operation so that we
> can create worst cases easily without having to work around other
> parts of the code trying to work against these worst cases.  It's done
> by creating an alloc bno btree lookalike rooted in a fake agf.
> The patch below is a working version that always does this during
> mount, so don't apply this on a machine with xfs root.
> I'm interested in comment about the approach, especially the way it
> does it's own freelist to avoid having to call in the alloc code
> and make it even slower.

I'll have a closer look in a while. It's just a bitmap array, right?

> I'd also like some input on how interface to userspace.  Doing it during
> mount but conditional would be one option, the other one an ioctl -
> in both cases I'd like to be able to specify up to which maxlevel to go
> as the tests for higher levels can take forever.

I was thinking of a couple of approaches when I started on this

        - similar to RCU torture tests, the btree test harness is
          run on XFS intialisation if config'd in. Requires faking a
          struct xfs_mount, though, and isn't configurable.
        - ioctl interface to run each test operation individually,
          and hook that up to an xfsqa test that used a sparse
          loopback mounted filesytem to exercise AG sizes up to 1TB.

I think the second approach allows us to test btrees on demand on
arbitrary disposable filesystems. It would also allow us to easily
extend the test harness over time - a new xfsqa test group could be
added so that each test can be written as a standalone test so
that we can easily isolate regressions.


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>