Repository navigation
Conversation
New workspace member holding the block-layer trace capture core before it moves out of cryptpilot-core. Assisted-by: Claude:glm-5.3 Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
Assisted-by: Claude:glm-5.3 Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
Assisted-by: Claude:glm-5.3 Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
Assisted-by: Claude:glm-5.3 Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
Replaces the tokio task per CPU with plain reader threads and a collector thread; the blocking core this crate publishes. Assisted-by: Claude:glm-5.3 Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
Assisted-by: Claude:glm-5.3 Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
Assisted-by: Claude:glm-5.3 Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
The trace capture core now lives in the blktrace-rs workspace member. drop_page_cache becomes an explicit call where it used to hide inside monitor(), so the mkfs read path still forces real I/O. Assisted-by: Claude:glm-5.3 Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
Assisted-by: Claude:glm-5.3 Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
blktrace-rs ran bindgen unconditionally, so on non-Linux hosts the first error was "Unable to generate bindings" from the missing linux/blktrace_api.h header. build.rs now returns early when the target OS is not Linux, letting lib.rs's compile_error! deliver the clean "Linux only" message instead. cryptpilot-core's out_dir binding and its env/PathBuf imports were used only under the provider-kbs feature, so a plain default-features build emitted an unused-variable warning. Move both inside the cfg block. blktrace-rs declared nix via the workspace, which serialized the workspace's "feature" and "time" features into the packaged manifest and duplicated ioctl. Declare nix locally with exactly the features the crate uses, ioctl and mount, the same way tokio is already declared locally. Also drop unused dependencies: tokio-util in cryptpilot-core (its only user was the in-tree blktrace module, now replaced by blktrace-rs) and the "time" dev-feature of blktrace-rs's tokio. Assisted-by: Claude:glm-5.3 Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Moves the block-layer trace capture core out of cryptpilot-core into a new
workspace member,
blktrace-rs, shaped as an independent library ready forcrates.io. cryptpilot-core keeps the mkfs analysis/replay logic and consumes
the crate with its new
asyncfeature.Why
The capture core (kernel ioctls, debugfs relay channel readers, blk_io_trace
record parsing) has value beyond this project and has no maintained Rust
equivalent on crates.io. Extracting it now also drops build-time bindgen and
several dependencies from cryptpilot-core.
The crate
Drop-based STOP/TEARDOWN on every exit path (a start failure now unwinds
through Drop, which the old tokio code did not guarantee).
asyncfeature (default off):monitor_async/shutdown_asyncwrap thecore in
tokio::task::spawn_blocking, so async callers never stall theirexecutor. Without the feature the crate has zero tokio dependency.
thiserrortype with source chains; no anyhow in the publicsurface.
libclang + kernel header requirement); ioctls stay crate-private.
loop-device capture tests (sync and async) with panic-safe cleanup.
cryptpilot-core changes
fs/block/blktrace/and the bindgen section of build.rs(ttrpc section untouched).
mkfs.rsswitches tomonitor_async/shutdown_async;drop_page_cachebecomes an explicit call where it used to hide inside
monitor(), keepingthe same position in the sequence. The event analysis loop is unchanged.
Publishing
cargo packagepasses; the packaged manifest is verified clean (nix pullsonly ioctl + mount). Publishing to crates.io is a separate manual step.
Rust-Go sync: not applicable, no blktrace counterpart in verity-go.