OCFS2 Discontig-bg Test

Introduction

This document aims at scheduling the testing plan against discontiguous block group which we're currently implementing on Ocfs2, and it would also be the place where we record the testing result to trace the status for each drop as well as keeping track of all bugs exposed for discontig-bg . In an addition, we also explain in a elaborate way of how all of the testcases will be organized and what's the workflow of their corresponding testing tool. The test aims to attack both fs and tools, in different series however. The goal here is to thoroughly test the discontigous-bg by covering as many as possible codes which have relationship with discontigous-bg, and guarantee tools and fs's sanity and stability before formal release.

Warming-Up

There is one same prerequisite to do all discontiguous-bg related tests: fill up the volume as fragmented as no more 4M contigous would be able to be found(maybe 2M for 1k blocksize, and 1M for 512). that's the very warming-up stuff we need to do beforehand to activate discontiguous block group. I'm going to use Joel's script by changing a little bit on-demand.

Testcases For FS/Tools

Testcases for fs consists of single-node,multi-nodes, each one has basic, stress and boundary subtests. while testcases for tools is simple and plain by now.

1. Single-node Tests

1. Basic functional test.
Goal is here is to cover as many discontiguous codes as possible, we'go going to test all metadata's allocatioin/freeing and reading/updating, includes inode, xattr, dxdir, refcount and data extent/(am I missing anything else?), of course with all bs and cs combinations being tried.
Fortunately enough, we've already got rigorous testcases for different metadata(xattr, dxdir, refcount), they're all get well-prepared to do the above job for performing operations on discontigous block group.
2. Random tests:
Testing alloc/free, read/update suballoc_bits randomly.
3. Concurrent tests, tests with a fixed number of processes to concurrently manipulate on one discontiguous block group:
1) 1/4 child processes do allocations.
2) 1/4 child processes do freeings.
3) 1/4 child processes do reading/stating.
4) 1/4 child processes do updating.
Can be convenient to be checked by inode/xattr block.
4. Boundary test:
1) Using one extent record(Like contiguous one)
2) Fill up all extent_rec slots in group desc for all blocksize.
3) Using up all suballoc_bits in one discontiguous bg.
5. Stress & Destructive tests:
1) Filling up the volume until ENOSPC by inlined files.
2) Testing the allocation/freeing, reading/updating intensively by increasing the workload of volumesize, discontiguous bg num, concurrent children etc.
3) Using the existing inode_allocation/xattr/dxdir/refcount stress testcases to perform a auxiliarily test.
4) Crash the testing node when allocating/freeing being performed against discontiguous bg, see how fsck.ocfs2 handles it?
5) Running out of extents(in a severely fragmented fs).
6. Data&Metadata integrity test:

2. Multi-nodes Tests

NOTE:To launch the multi-nodes test,need to install openmpi first,and a configuration of ssh/rsh passwordless access also needed in advance.

3. Testcases For Tools

1. Debugfs.ocfs2 Tests
Manually issue command to check the dump for discontiguous bg.
2. Fsck.ocfs2 Tests
Verify if the corruptions made by fswreck can be properly fixed, and also check if user's date get hurt after a massive discontiguous operation, and how fsck.ocfs2 behave after a crash.
3. Libocfs2 Tests
To be filled...
4. Backward&forward compatibility Tests
Look how older tools work with newer fs.