[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 19/43] block: Drop raw_refresh_limits()
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 19/43] block: Drop raw_refresh_limits() |
Date: |
Tue, 5 Jul 2016 17:50:28 +0200 |
From: Eric Blake <address@hidden>
The raw block driver was blindly copying all limits from bs->file,
even though: 1. the main bdrv_refresh_limits() already does this
for many of the limits, and 2. blindly copying from the children
can weaken any stricter limits that were already inherited from
the backing chain during the main bdrv_refresh_limits(). Also,
a future patch is about to move .request_alignment into
BlockLimits, and that is a limit that should NOT be copied from
other layers in the BDS chain.
Thus, we can completely drop raw_refresh_limits(), and rely on
the block layer setting up the proper limits.
Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/raw_bsd.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/block/raw_bsd.c b/block/raw_bsd.c
index 7f63791..5855e84 100644
--- a/block/raw_bsd.c
+++ b/block/raw_bsd.c
@@ -1,6 +1,6 @@
/* BlockDriver implementation for "raw"
*
- * Copyright (C) 2010, 2013, Red Hat, Inc.
+ * Copyright (C) 2010-2016 Red Hat, Inc.
* Copyright (C) 2010, Blue Swirl <address@hidden>
* Copyright (C) 2009, Anthony Liguori <address@hidden>
*
@@ -150,11 +150,6 @@ static int raw_get_info(BlockDriverState *bs,
BlockDriverInfo *bdi)
return bdrv_get_info(bs->file->bs, bdi);
}
-static void raw_refresh_limits(BlockDriverState *bs, Error **errp)
-{
- bs->bl = bs->file->bs->bl;
-}
-
static int raw_truncate(BlockDriverState *bs, int64_t offset)
{
return bdrv_truncate(bs->file->bs, offset);
@@ -252,7 +247,6 @@ BlockDriver bdrv_raw = {
.bdrv_getlength = &raw_getlength,
.has_variable_length = true,
.bdrv_get_info = &raw_get_info,
- .bdrv_refresh_limits = &raw_refresh_limits,
.bdrv_probe_blocksizes = &raw_probe_blocksizes,
.bdrv_probe_geometry = &raw_probe_geometry,
.bdrv_media_changed = &raw_media_changed,
--
1.8.3.1
- [Qemu-devel] [PULL 09/43] block: Give nonzero result to blk_get_max_transfer_length(), (continued)
- [Qemu-devel] [PULL 09/43] block: Give nonzero result to blk_get_max_transfer_length(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 12/43] qcow2: Set request_alignment during .bdrv_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 15/43] block: Set default request_alignment during bdrv_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 17/43] block: Wording tweaks to write zeroes limits, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 14/43] block: Set request_alignment during .bdrv_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 16/43] block: Switch transfer length bounds to byte-based, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 13/43] raw-win32: Set request_alignment during .bdrv_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 18/43] block: Switch discard length bounds to byte-based, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 19/43] block: Drop raw_refresh_limits(),
Kevin Wolf <=
- [Qemu-devel] [PULL 20/43] block: Split bdrv_merge_limits() from bdrv_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 24/43] block: fix return code for partial write for Linux AIO, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 22/43] block: Fix error message style, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 27/43] blkreplay: Convert to byte-based I/O, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 21/43] block: Move request_alignment into BlockLimit, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 23/43] block: Use bool as appropriate for BDS members, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 25/43] block/qdev: Fix NULL access when using BB twice, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 26/43] vvfat: Use BdrvChild for s->qcow, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 28/43] vhdx: Some more BlockBackend use in vhdx_create(), Kevin Wolf, 2016/07/05