fix: report blobstore ENOSPC - #76
Conversation
21509fa to
d8356de
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves how out-of-space conditions in the SPDK blobstore are surfaced and diagnosed, ensuring thin-provisioned write failures are reported as NVMe CAPACITY EXCEEDED (instead of a generic device error) and reducing log spam when the lvstore runs out of clusters. It also adds EC (erasure-coded bdev) diagnostics improvements to better attribute and throttle child I/O failure logging, aligned with the referenced RCA.
Changes:
- Blobstore: add a one-shot “out of clusters” WARNLOG gate per full→free→full cycle.
- Lvol: translate blobstore
-ENOSPCinto NVMe statusGENERIC / CAPACITY_EXCEEDED. - EC bdev: add safe slot attribution via a published base-bdev pointer cache plus per-slot failure counters to throttle repeated failure logs; add unit test coverage for the new gate logic.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/unit/lib/bdev/vbdev_lvol.c/vbdev_lvol_ut.c | Adds a unit test asserting ENOSPC maps to NVMe CAPACITY EXCEEDED and updates blob write stubs to inject errors. |
| test/unit/lib/bdev/ec/bdev_ec.c/bdev_ec_ut.c | Adds a unit test for the per-slot failure log throttling gate behavior. |
| module/bdev/lvol/vbdev_lvol.c | Maps blobstore -ENOSPC completion to spdk_bdev_io_complete_nvme_status(... CAPACITY_EXCEEDED). |
| module/bdev/ec/bdev_ec.c | Publishes/clears cached base-bdev pointers on open/close paths; resets per-slot failure counter on successful hot-swap; adds more detailed submit-failure logs and exports failure counters in JSON. |
| module/bdev/ec/bdev_ec_io.c | Adds slot mapping via cached base-bdev pointers and throttled logging on failed child I/O completion and submit failures. |
| module/bdev/ec/bdev_ec_internal.h | Introduces base_bdevs[], child_io_failures[], and helper inlines for pointer publishing and log gating. |
| lib/blob/blobstore.h | Adds out_of_clusters_warned to the blobstore state (protected by used_lock). |
| lib/blob/blobstore.c | Implements the warn-once gate for ENOSPC cluster allocation and clears it when clusters are released. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d8356de to
1337c63
Compare
1337c63 to
4238a68
Compare
4238a68 to
08c9c6c
Compare
d935ccb to
8eaabbc
Compare
|
While testing for benchmarking, found a bug: the module's |
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
longhorn/longhorn-1061 Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
5ab116d to
df37696
Compare
Which issue(s) this PR fixes:
Issue longhorn/longhorn#1061
What this PR does / why we need it:
See RCA.
Special notes for your reviewer:
NoneAdditional documentation or context
None