qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH for-2.6] block: Don't ignore flags in blk_aio_write_


From: Kevin Wolf
Subject: [Qemu-devel] [PATCH for-2.6] block: Don't ignore flags in blk_aio_write_zeroes()
Date: Fri, 15 Apr 2016 10:27:12 +0200

Commit 57d6a428 neglected to pass the given flags to blk_aio_prwv(),
which broke discard by WRITE SAME for scsi-disk (the UNMAP bit would be
ignored).

Reported-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
 block/block-backend.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/block/block-backend.c b/block/block-backend.c
index 140c3f7..83cec29 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -942,7 +942,8 @@ BlockAIOCB *blk_aio_write_zeroes(BlockBackend *blk, int64_t 
sector_num,
 
     return blk_aio_prwv(blk, sector_num << BDRV_SECTOR_BITS,
                         nb_sectors << BDRV_SECTOR_BITS, NULL,
-                        blk_aio_write_entry, BDRV_REQ_ZERO_WRITE, cb, opaque);
+                        blk_aio_write_entry, flags | BDRV_REQ_ZERO_WRITE,
+                        cb, opaque);
 }
 
 int blk_pread(BlockBackend *blk, int64_t offset, void *buf, int count)
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]