[f2fs-dev] [PATCH v4 07/19] mips/crc32: expose CRC32 functions through lib

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Move the mips CRC32 assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the ar

[f2fs-dev] [PATCH v4 08/19] powerpc/crc32: expose CRC32 functions through lib

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Move the powerpc CRC32C assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all th

[f2fs-dev] [PATCH v4 01/19] lib/crc32: drop leading underscores from __crc32c_le_base

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Remove the leading underscores from __crc32c_le_base(). This is in preparation for adding crc32c_le_arch() and eventually renaming __crc32c_le() to crc32c_le(). Reviewed-by: Ard Biesheuvel Signed-off-by: Eric Biggers --- arch/arm64/lib/crc32-glue.c | 2 +- arch/riscv/lib/c

[f2fs-dev] [PATCH v4 02/19] lib/crc32: improve support for arch-specific overrides

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Currently the CRC32 library functions are defined as weak symbols, and the arm64 and riscv architectures override them. This method of arch-specific overrides has the limitation that it only works when both the base and arch code is built-in. Also, it makes the arch-specific

[f2fs-dev] [PATCH v4 19/19] scsi: target: iscsi: switch to using the crc32c library

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Now that the crc32c() library function directly takes advantage of architecture-specific optimizations, it is unnecessary to go through the crypto API. Just use crc32c(). This is much simpler, and it improves performance due to eliminating the crypto API overhead. Reviewed-b

[f2fs-dev] [PATCH v4 17/19] jbd2: switch to using the crc32c library

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Now that the crc32c() library function directly takes advantage of architecture-specific optimizations, it is unnecessary to go through the crypto API. Just use crc32c(). This is much simpler, and it improves performance due to eliminating the crypto API overhead. Reviewed-b

[f2fs-dev] [PATCH v4 11/19] x86/crc32: update prototype for crc_pcl()

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers - Change the len parameter from unsigned int to size_t, so that the library function which takes a size_t can safely use this code. - Rename to crc32c_x86_3way() which is much clearer. - Move the crc parameter to the front, as this is the usual convention. Reviewed-by: Ard

[f2fs-dev] [PATCH v4 03/19] lib/crc32: expose whether the lib is really optimized at runtime

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Make the CRC32 library export a function crc32_optimizations() which returns flags that indicate which CRC32 functions are actually executing optimized code at runtime. This will be used to determine whether the crc32[c]-$arch shash algorithms should be registered in the crypt

[f2fs-dev] [PATCH v4 13/19] x86/crc32: expose CRC32 functions through lib

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Move the x86 CRC32 assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the arc

[f2fs-dev] [PATCH v4 12/19] x86/crc32: update prototype for crc32_pclmul_le_16()

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers - Change the len parameter from unsigned int to size_t, so that the library function which takes a size_t can safely use this code. - Move the crc parameter to the front, as this is the usual convention. Reviewed-by: Ard Biesheuvel Signed-off-by: Eric Biggers --- arch/x8

[f2fs-dev] [PATCH v4 00/19] Wire up CRC32 library functions to arch-optimized code

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
This patchset applies to v6.13-rc1 and is also available in git via: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git crc32-lib-v4 CRC32 is a family of common non-cryptographic integrity check algorithms that are fairly fast with a portable C implementation and be

[f2fs-dev] [PATCH v4 09/19] s390/crc32: expose CRC32 functions through lib

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Move the s390 CRC32 assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the ar

[f2fs-dev] [PATCH v4 05/19] arm/crc32: expose CRC32 functions through lib

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Move the arm CRC32 assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the arc

[f2fs-dev] [PATCH v4 14/19] bcachefs: Explicitly select CRYPTO from BCACHEFS_FS

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Explicitly select CRYPTO from BCACHEFS_FS, so that this dependency of CRYPTO_SHA256, CRYPTO_CHACHA20, and CRYPTO_POLY1305 (which are also selected) is satisfied. Currently this dependency is satisfied indirectly via LIBCRC32C, but this is fragile and is planned to change (http

[f2fs-dev] [PATCH v4 15/19] lib/crc32: make crc32c() go directly to lib

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Now that the lower level __crc32c_le() library function is optimized for each architecture, make crc32c() just call that instead of taking an inefficient and error-prone detour through the shash API. Note: a future cleanup should make crc32c_le() be the actual library function

[f2fs-dev] [PATCH v4 10/19] sparc/crc32: expose CRC32 functions through lib

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Move the sparc CRC32C assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all the

[f2fs-dev] [PATCH v4 18/19] f2fs: switch to using the crc32 library

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Now that the crc32() library function takes advantage of architecture-specific optimizations, it is unnecessary to go through the crypto API. Just use crc32(). This is much simpler, and it improves performance due to eliminating the crypto API overhead. Reviewed-by: Ard Bies

[f2fs-dev] [PATCH v4 04/19] crypto: crc32 - don't unnecessarily register arch algorithms

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Instead of registering the crc32-$arch and crc32c-$arch algorithms if the arch-specific code was built, only register them when that code was built *and* is not falling back to the base implementation at runtime. This avoids confusing users like btrfs which checks the shash dr

[f2fs-dev] [PATCH v4 16/19] ext4: switch to using the crc32c library

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Now that the crc32c() library function directly takes advantage of architecture-specific optimizations, it is unnecessary to go through the crypto API. Just use crc32c(). This is much simpler, and it improves performance due to eliminating the crypto API overhead. Reviewed-b

[f2fs-dev] [PATCH v4 06/19] loongarch/crc32: expose CRC32 functions through lib

2024-12-01 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers Move the loongarch CRC32 assembly code into the lib directory and wire it up to the library interface. This allows it to be used without going through the crypto API. It remains usable via the crypto API too via the shash algorithms that use the library interface. Thus all t

[f2fs-dev] [PATCH] f2fs: The GC triggered by ioctl also needs to mark the segno as victim

2024-12-01 Thread Yongpeng Yang via Linux-f2fs-devel
In SSR mode, the segment selected for allocation might be the same as the target segment of the GC triggered by ioctl, resulting in the GC moving the CURSEG_I(sbi, type)->segno. Fixes: e066b83c9b40 ("f2fs: add ioctl to flush data from faster device to cold area") Signed-off-by: Yongpeng Yang ---