Repository navigation
Conversation
2995700 to
8947836
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Critical cleanup and failure-transition races can corrupt parity, free descriptors still used by outstanding I/O, and leave device-wide I/O blocked indefinitely.
4 open issues
What changed in this PR
Adds bdev_ec_fail_base_bdev so Longhorn can mark an attached EC disk as failed without waiting for device removal.
Changes:
- Exposes the failure operation through the RPC handler, schema, Python client, and CLI.
- Blocks replacement while cleanup holds the old descriptor and reports
cleanup_pending. - Shares failure handling with device-removal events and adds unit coverage.
| File | Description |
|---|---|
test/unit/lib/bdev/ec/bdev_ec.c/bdev_ec_ut.c |
Tests failure requests, replacement blocking, and cleanup status. |
schema/schema.json |
Defines the new RPC parameters. |
python/spdk/rpc/bdev.py |
Adds the Python RPC wrapper. |
python/spdk/cli/bdev.py |
Adds the CLI command. |
module/bdev/ec/bdev_ec.h |
Declares and documents the failure API. |
module/bdev/ec/bdev_ec.c |
Implements explicit failure, shared cleanup, replacement guarding, and status reporting. |
module/bdev/ec/bdev_ec_rpc.c |
Handles failure requests and returns slot cleanup status. |
Review effort: Balanced
8947836 to
502f868
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The replace RPC still reports pending slot cleanup as an in-progress replacement, misleading callers and omitting guidance to check cleanup_pending in bdev_ec_get_bdevs before retrying.
2 open issues
3 resolved since last review
Review effort: Balanced
502f868 to
484b77b
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The EC integrity and descriptor-lifecycle changes need runtime validation of fail/cleanup/replace during concurrent foreground I/O and resize, because the unit tests stub quiesce and omit the asynchronous cleanup/channel-walk sequence.
No open issues 🎉
2 resolved since last review
Review effort: Balanced
longhorn/longhorn-13827 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
longhorn/longhorn-13827 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
longhorn/longhorn-13827 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
longhorn/longhorn-13827 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
longhorn/longhorn-13827 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
longhorn/longhorn-13827 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
longhorn/longhorn-13827 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
longhorn/longhorn-13827 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
484b77b to
94babb9
Compare


Which issue(s) this PR fixes:
Issue longhorn/longhorn#13827
What this PR does / why we need it:
Before this change, a disk in an EC bdev only became FAILED when SPDK saw it gone. Longhorn had no way to fail a disk it knew was bad but still attached.
This adds a bdev_ec_fail_base_bdev RPC that moves a NORMAL slot to FAILED.
-EBUSYuntil cleanup is done.cleanup_pendinginbdev_ec_get_bdevs: Tells Longhorn why replace returned busy and when to retry.Special notes for your reviewer:
NoneAdditional documentation or context
longhorn/longhorn#14586