From 0b9fd3f467dc5ac041fa014cd28c949b25b87d25 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Tue, 10 Jul 2018 14:31:17 +0800 Subject: block: Use BdrvChild to discard Other I/O functions are already using a BdrvChild pointer in the API, so make discard do the same. It makes it possible to initiate the same permission checks before doing I/O, and much easier to share the helper functions for this, which will be added and used by write, truncate and copy range paths. Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/raw-format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/raw-format.c') diff --git a/block/raw-format.c b/block/raw-format.c index a3591985f6..dee262875a 100644 --- a/block/raw-format.c +++ b/block/raw-format.c @@ -297,7 +297,7 @@ static int coroutine_fn raw_co_pdiscard(BlockDriverState *bs, if (ret) { return ret; } - return bdrv_co_pdiscard(bs->file->bs, offset, bytes); + return bdrv_co_pdiscard(bs->file, offset, bytes); } static int64_t raw_getlength(BlockDriverState *bs) -- cgit v1.2.3