Commit 5031f0f3 authored by Slawomir Ptak's avatar Slawomir Ptak Committed by Konrad Sztyber
Browse files

module/raid: Assign bdev_io buffers to raid_io



If an application does not allocate data and metadata
buffers for the read operation and relies on the generic
bdev layer to do the allocations, the data iovecs
and metadata pointer was not copied to the raid_io
and not pushed down the I/O stack.

This fix copies the pointers once the allocations are complete.
If the application did provide the buffers, this flow will
still work since those pointers are already in the bdev_io
and raid_io.

Change-Id: Ib9e212ec97b59c0ed57f2e48a35fdf8fd2a21a52
Signed-off-by: default avatarSlawomir Ptak <slawomir.ptak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24961


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent dc3ea9d2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -890,6 +890,10 @@ raid_bdev_get_buf_cb(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io,
		return;
	}

	raid_io->iovs = bdev_io->u.bdev.iovs;
	raid_io->iovcnt = bdev_io->u.bdev.iovcnt;
	raid_io->md_buf = bdev_io->u.bdev.md_buf;

	raid_bdev_submit_rw_request(raid_io);
}