Skip to content

Commit

Permalink
raid5f: fix missing stripe_request release in xor error path
Browse files Browse the repository at this point in the history
Change-Id: Ibcdace7d88fa142f8923756c380b860abe4806a1
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18387
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
  • Loading branch information
apaszkie authored and tomzawadzki committed May 29, 2023
1 parent 8d1993a commit 0a5d8f0
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions module/bdev/raid/raid5f.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,21 @@ static void raid5f_xor_stripe_retry(struct stripe_request *stripe_req);
static void
raid5f_xor_stripe_done(struct stripe_request *stripe_req)
{
struct raid5f_io_channel *r5ch = stripe_req->r5ch;

if (stripe_req->xor.status != 0) {
struct raid_bdev_io *raid_io = stripe_req->raid_io;

SPDK_ERRLOG("stripe xor failed: %s\n", spdk_strerror(-stripe_req->xor.status));
raid_bdev_io_complete(stripe_req->raid_io, SPDK_BDEV_IO_STATUS_FAILED);
raid5f_stripe_request_release(stripe_req);
raid_bdev_io_complete(raid_io, SPDK_BDEV_IO_STATUS_FAILED);
} else {
raid5f_stripe_request_submit_chunks(stripe_req);
}

if (!TAILQ_EMPTY(&stripe_req->r5ch->xor_retry_queue)) {
stripe_req = TAILQ_FIRST(&stripe_req->r5ch->xor_retry_queue);
TAILQ_REMOVE(&stripe_req->r5ch->xor_retry_queue, stripe_req, link);
if (!TAILQ_EMPTY(&r5ch->xor_retry_queue)) {
stripe_req = TAILQ_FIRST(&r5ch->xor_retry_queue);
TAILQ_REMOVE(&r5ch->xor_retry_queue, stripe_req, link);
raid5f_xor_stripe_retry(stripe_req);
}
}
Expand Down

0 comments on commit 0a5d8f0

Please sign in to comment.