30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
|
|
From a800af5f8a944fb46c2c6ffc7c4a9054f7395b9b Mon Sep 17 00:00:00 2001
|
||
|
|
From: raywang <honglei.wang@smartx.com>
|
||
|
|
Date: Sun, 5 Jan 2025 14:04:39 +0800
|
||
|
|
Subject: [PATCH] hw/nvme: Remove redundant dma_blk_write
|
||
|
|
|
||
|
|
Commit f0ac211 changes alignment in dma functions for nvme, but it
|
||
|
|
did not delete the original dma_blk_write when picking the code.
|
||
|
|
|
||
|
|
Signed-off-by: raywang <honglei.wang@smartx.com>
|
||
|
|
---
|
||
|
|
hw/nvme/ctrl.c | 2 --
|
||
|
|
1 file changed, 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
|
||
|
|
index 7c9f97bdb3..f1c7641158 100644
|
||
|
|
--- a/hw/nvme/ctrl.c
|
||
|
|
+++ b/hw/nvme/ctrl.c
|
||
|
|
@@ -1282,8 +1282,6 @@ static inline void nvme_blk_write(BlockBackend *blk, int64_t offset,
|
||
|
|
assert(req->sg.flags & NVME_SG_ALLOC);
|
||
|
|
|
||
|
|
if (req->sg.flags & NVME_SG_DMA) {
|
||
|
|
- req->aiocb = dma_blk_write(blk, &req->sg.qsg, offset, BDRV_SECTOR_SIZE,
|
||
|
|
- cb, req);
|
||
|
|
req->aiocb = dma_blk_write(blk, &req->sg.qsg, offset, align, cb, req);
|
||
|
|
} else {
|
||
|
|
req->aiocb = blk_aio_pwritev(blk, offset, &req->sg.iov, 0, cb, req);
|
||
|
|
--
|
||
|
|
2.41.0.windows.1
|
||
|
|
|