refactor(cli): move highbit policy leaf to Rust
Export FIO_highbit64 directly from Rust under the existing caller symbol and remove the C forwarding wrapper. Preserve the nonzero-input contract and add boundary tests for the scalar policy leaf. Test Plan: - capped nightly rustfmt check - capped root clippy with all targets and -D warnings - capped native make -j1 - capped upstream make -j1 -C tests test - capped CLI clippy and 185 CLI tests All integrated checks ran at the combined working-tree tip under a serial 40 GiB virtual-memory cap. Standalone root Rust unit linking remains unavailable because the crate imports C-owned bridge symbols.
This commit is contained in:
+2
-11
@@ -332,7 +332,8 @@ static int FIO_shouldDisplayMultipleFileSummary(FIO_ctx_t const* fCtx)
|
||||
* The declarations in fileio.h remain the C ABI shims while file-I/O
|
||||
* orchestration and diagnostics stay here. */
|
||||
int FIO_rust_checkFilenameCollisions(const char** filenameTable, unsigned nbFiles);
|
||||
unsigned FIO_rust_highbit64(unsigned long long v);
|
||||
/* FIO_highbit64() is a Rust-owned scalar policy leaf. */
|
||||
unsigned FIO_highbit64(unsigned long long v);
|
||||
unsigned long long FIO_rust_getLargestFileSize(const char** inFileNames, unsigned nbFiles);
|
||||
int FIO_rust_adjustParamsForPatchFromMode(FIO_prefs_t* prefs,
|
||||
ZSTD_compressionParameters* comprParams,
|
||||
@@ -978,16 +979,6 @@ int FIO_checkFilenameCollisions(const char** filenameTable, unsigned nbFiles) {
|
||||
return FIO_rust_checkFilenameCollisions(filenameTable, nbFiles);
|
||||
}
|
||||
|
||||
/* FIO_highbit64() :
|
||||
* gives position of highest bit.
|
||||
* note : only works for v > 0 !
|
||||
*/
|
||||
static unsigned FIO_highbit64(unsigned long long v)
|
||||
{
|
||||
assert(v != 0);
|
||||
return FIO_rust_highbit64(v);
|
||||
}
|
||||
|
||||
static void FIO_adjustMemLimitForPatchFromMode(FIO_prefs_t* const prefs,
|
||||
unsigned long long const dictSize,
|
||||
unsigned long long const maxSrcFileSize)
|
||||
|
||||
Reference in New Issue
Block a user