There are three important ideas used in RAID - Redundant Arrays of Independent Devices: data duplication, data striping, and redundancy through parity. These are combined in different way to form different RAID levels.
Data duplication is of little interest to a filesystem. It does not effect the performance characteristics of a storage device in a way that a filesystem can particularly make use of.
Data striping can usefully be recognised by the filesystem. If the filesystem knows which data blocks are on different real devices, then it can make decisions about data layout to try to avoid imbalance (don't put all the meta-data on the same device, or it will be a bottle neck) and to reduce 'head contention' - e.g. by trying to make small files live entirely on just one device, so that multiple files can be accessed independently in parallel.
Redundancy through parity can be a substantial performance hit for random updates as a write request will often need old data blocks to be read first so that parity calculations can be performed. Any assistance that the filesystem can give in patterning it's access to decrease pre-reading is a good thing.
The best write access pattern for parity based redundancy RAID levels, such as RAID-4 and RAID-5, is to write whole stripes at a time. If this pattern is followed, then old data or old parity will never need to be read first, and the full device bandwidth can be given to actually writing the data.
Further there is an interesting complication with these raid levels. If a system suffers an unclean shutdown (e.g. power failure) while writing out some data and matching parity, it will not know on restart whether the parity blocks are correct, and will have to regenerate them. If after the unclean shutdown and restart, one of the devices in the array is found to be missing or faulty, then the parity regeneration will not be possible and some unknown amount of data will be undetectably corrupted.
In particular, any data block on a failed drive on a stripe that was being written at the time of failure must be considered to be lost. In a traditional filesystem, this could potentially be a block in some file that hasn't been touched for months. The probability of corruption is fairly low, but it is a very real possibility and so is not acceptable.
So the ideal access pattern for a filesystem to use on a RAID array that uses parity, such as RAID-4 or RAID-5 is:
LaFS addresses all of these issues. Issue 1 is easy to achieve by padding, where necessary, all write clusters to be a multiple of the stripe size.
Issue 2 is fundamental to the nature of log structuring providing segments are aligned with stripes, and write clusters are padded as above.
Issue 3 is needed as part of the roll-forward mechanism in mounting a LFS anyway.
Issue 4 can be addresses as follows.
The preferred parity based raid level for LaFS is RAID-4. The advantage that the more common RAID-5 has is that parity blocks are distributed among all devices so parity updates are also distributed. However the practice of writing whole stripes at a time makes that advantage irrelevant, and the more simple rectangular layout of RAID-4 gives it an advantage.
Further the preferred style of addressing within a RAID-4 array is to have the first device as the parity device, and to address blocks in remaining devices in a linear fashion. All blocks in the first data device come first, followed by all blocks in the next device and so on.
LaFS is able to handle the non-contiguous segments with some simple arithmetic, and we gain the advantage of being able to add devices to the array quite easily. A device can be zeroed and then added, and parity will remain correct. LaFS can then be told about the extra space. This extra space will be realised as a little bit of extra space in each segment. It will not become available instantly, but as the cleaning process starts filling up, and freeing up, these larger segments, more space will become available.
Whether the RAID-4 uses a traditional chunk-based addressing or an expandable linear addressing, it will 'know' which blocks are on the same device and will be able to lay data out to make best use of the devices.
Another advantage of RAID-4 is that, to LaFS, a RAID-4 looks exactly like a RAID-0, so the knowledge of the rectangular addressing can be equally useful for both.
Thus with some careful thought, the fact that a LFS always writes in largish contiguous blocks, means that it can behave optimally for RAID arrays.