mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 23:09:29 +02:00
raid6: improve the public interface
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. Link: https://lore.kernel.org/20260518051804.462141-8-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Ard Biesheuvel <ardb@kernel.org> # kunit only on arm64 Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Alexander Gordeev <agordeev@linux.ibm.com> Cc: Alexandre Ghiti <alex@ghiti.fr> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Borislav Petkov (AMD)" <bp@alien8.de> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Chris Mason <clm@fb.com> Cc: Christian Borntraeger <borntraeger@linux.ibm.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: David Sterba <dsterba@suse.com> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Li Nan <linan122@huawei.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Song Liu <song@kernel.org> Cc: Sven Schnelle <svens@linux.ibm.com> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: WANG Xuerui <kernel@xen0n.name> Cc: Will Deacon <will@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
7e91f76a96
commit
35472bc6f3
@@ -131,11 +131,11 @@ do_sync_gen_syndrome(struct page **blocks, unsigned int *offsets, int disks,
|
||||
}
|
||||
}
|
||||
if (submit->flags & ASYNC_TX_PQ_XOR_DST) {
|
||||
BUG_ON(!raid6_call.xor_syndrome);
|
||||
BUG_ON(!raid6_can_xor_syndrome());
|
||||
if (start >= 0)
|
||||
raid6_call.xor_syndrome(disks, start, stop, len, srcs);
|
||||
raid6_xor_syndrome(disks, start, stop, len, srcs);
|
||||
} else
|
||||
raid6_call.gen_syndrome(disks, len, srcs);
|
||||
raid6_gen_syndrome(disks, len, srcs);
|
||||
async_tx_sync_epilog(submit);
|
||||
}
|
||||
|
||||
|
||||
@@ -418,7 +418,7 @@ async_raid6_2data_recov(int disks, size_t bytes, int faila, int failb,
|
||||
else
|
||||
ptrs[i] = page_address(blocks[i]) + offs[i];
|
||||
|
||||
raid6_2data_recov(disks, bytes, faila, failb, ptrs);
|
||||
raid6_recov_2data(disks, bytes, faila, failb, ptrs);
|
||||
|
||||
async_tx_sync_epilog(submit);
|
||||
|
||||
@@ -501,7 +501,7 @@ async_raid6_datap_recov(int disks, size_t bytes, int faila,
|
||||
else
|
||||
ptrs[i] = page_address(blocks[i]) + offs[i];
|
||||
|
||||
raid6_datap_recov(disks, bytes, faila, ptrs);
|
||||
raid6_recov_datap(disks, bytes, faila, ptrs);
|
||||
|
||||
async_tx_sync_epilog(submit);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user