[PW_SID:1093259] [01/19] btrfs: require at least 4 devices for RAID 6#1912
[PW_SID:1093259] [01/19] btrfs: require at least 4 devices for RAID 6#1912linux-riscv-bot wants to merge 20 commits into
Conversation
While the RAID6 algorithm could in theory support 3 devices by just copying the data disk to the two parity disks, this version is not only useless because it is a suboptimal version of 3-way mirroring, but also broken with various crashes and incorrect parity generation in various architecture-optimized implementations. Disallow it similar to mdraid which requires at least 4 devices for RAID 6. Fixes: 53b381b ("Btrfs: RAID5 and RAID6") Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Currently the raid6 code can be compiled as userspace code to run the test suite. Convert that to be a kunit case with minimal changes to avoid mutating global state so that we can drop this requirement. Note that this is not a good kunit test case yet and will need a lot more work, but that is deferred until the raid6 code is moved to it's new place, which is easier if the userspace makefile doesn't need adjustments for the new location first. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
With the test code ported to kernel space, none of this is required. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Move the raid6 code to live in lib/raid/ with the XOR code, and change the internal organization so that each architecture has a subdirectory similar to the CRC, crypto and XOR libraries, and fix up the Makefile to only build files actually needed. Also move the kunit test case from the history test/ subdirectory to tests/ and use the normal naming scheme for it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
These are not used anywhere in the kernel. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Just open code it as in other places in the kernel. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Stop directly calling into function pointers from users of the RAID6 PQ API, and provide exported functions with proper documentation and API guarantees asserts where applicable instead. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Split out two new headers from the public pq.h: - lib/raid/raid6/algos.h contains the algorithm lists private to lib/raid/raid6 - include/linux/raid/pq_tables.h contains the tables also used by async_tx providers. The public include/linux/pq.h is now limited to the public interface for the consumers of the RAID6 PQ API. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Match the xor version with two initcalls for the built-in case to delay calibrartion. This prepares for adding non-calibration init code. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Avoid indirect calls for P/Q parity generation. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Avoid expensive indirect calls for the recovery routines as well. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Drop the pointless mention of the file name, and use standard formatting for the top of file comments. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The raid6 test combines various generation and recovery algorithms. Use KUNIT_CASE_PARAM and provide a generator that iterates over the possible combinations instead of looping inside a single test instance. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Use vmalloc for the data buffers instead of using static .data allocations. This provides for better out of bounds checking and avoids wasting kernel memory after the test has run. vmalloc is used instead of kmalloc to provide for better out of bounds access checking as in other kunit tests. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Move the global dataptr array into test_recover() as all sites that fill data or parity can use test_buffers directly, and this localized the override for the failed slots to the recovery testing routine. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The current test has double-quadratic behavior in the selection for
the updated ("XORed") disks, and in the selection of updated pointers,
which makes scaling it to more tests difficult. At the same time it
only ever tests with the maximum number of disks, which leaves a
coverage hole for smaller ones.
Fix this by randomizing the total number, failed disks and regions
to update, and increasing the upper number of tests disks.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The current test has double-quadratic behavior in the selection for
the updated ("XORed") disks, and in the selection of updated pointers,
which makes scaling it to more tests difficult. At the same time it
only ever tests with the maximum number of disks, which leaves a
coverage hole for smaller ones.
Fix this by randomizing the total number, failed disks and regions
to update, and increasing the upper number of tests disks.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add code to add random alignment to the buffers to test the case where they are not page aligned, and to move the buffers to the end of the allocation so that they are next to the vmalloc guard page. This does not include the recovery buffers as the recovery requires page alignment. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[01/19] btrfs: require at least 4 devices for RAID 6" |
|
Patch 1: "[01/19] btrfs: require at least 4 devices for RAID 6" |
|
Patch 1: "[01/19] btrfs: require at least 4 devices for RAID 6" |
|
Patch 1: "[01/19] btrfs: require at least 4 devices for RAID 6" |
|
Patch 1: "[01/19] btrfs: require at least 4 devices for RAID 6" |
|
Patch 1: "[01/19] btrfs: require at least 4 devices for RAID 6" |
|
Patch 1: "[01/19] btrfs: require at least 4 devices for RAID 6" |
|
Patch 1: "[01/19] btrfs: require at least 4 devices for RAID 6" |
|
Patch 1: "[01/19] btrfs: require at least 4 devices for RAID 6" |
|
Patch 1: "[01/19] btrfs: require at least 4 devices for RAID 6" |
|
Patch 17: "[17/19] raid6_kunit: randomize parameters and increase limits" |
|
Patch 17: "[17/19] raid6_kunit: randomize parameters and increase limits" |
|
Patch 17: "[17/19] raid6_kunit: randomize parameters and increase limits" |
|
Patch 18: "[18/19] raid6_kunit: randomize parameters and increase limits" |
|
Patch 18: "[18/19] raid6_kunit: randomize parameters and increase limits" |
|
Patch 18: "[18/19] raid6_kunit: randomize parameters and increase limits" |
|
Patch 18: "[18/19] raid6_kunit: randomize parameters and increase limits" |
|
Patch 18: "[18/19] raid6_kunit: randomize parameters and increase limits" |
|
Patch 18: "[18/19] raid6_kunit: randomize parameters and increase limits" |
|
Patch 18: "[18/19] raid6_kunit: randomize parameters and increase limits" |
|
Patch 18: "[18/19] raid6_kunit: randomize parameters and increase limits" |
|
Patch 18: "[18/19] raid6_kunit: randomize parameters and increase limits" |
|
Patch 18: "[18/19] raid6_kunit: randomize parameters and increase limits" |
|
Patch 18: "[18/19] raid6_kunit: randomize parameters and increase limits" |
|
Patch 18: "[18/19] raid6_kunit: randomize parameters and increase limits" |
|
Patch 19: "[19/19] raid6_kunit: randomize buffer alignment" |
|
Patch 19: "[19/19] raid6_kunit: randomize buffer alignment" |
|
Patch 19: "[19/19] raid6_kunit: randomize buffer alignment" |
|
Patch 19: "[19/19] raid6_kunit: randomize buffer alignment" |
|
Patch 19: "[19/19] raid6_kunit: randomize buffer alignment" |
|
Patch 19: "[19/19] raid6_kunit: randomize buffer alignment" |
|
Patch 19: "[19/19] raid6_kunit: randomize buffer alignment" |
|
Patch 19: "[19/19] raid6_kunit: randomize buffer alignment" |
|
Patch 19: "[19/19] raid6_kunit: randomize buffer alignment" |
|
Patch 19: "[19/19] raid6_kunit: randomize buffer alignment" |
|
Patch 19: "[19/19] raid6_kunit: randomize buffer alignment" |
|
Patch 19: "[19/19] raid6_kunit: randomize buffer alignment" |
2d4fcdd to
cd9d421
Compare
PR for series 1093259 applied to workflow__riscv__fixes
Name: [01/19] btrfs: require at least 4 devices for RAID 6
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1093259
Version: 1