[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 28/35] block: Reset buffer alignment on detach
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 28/35] block: Reset buffer alignment on detach |
Date: |
Mon, 12 Sep 2011 16:19:27 +0200 |
From: Markus Armbruster <address@hidden>
BlockDriverState member buffer_alignment is initially 512. The device
model may set them, with bdrv_set_buffer_alignment(). If the device
model gets detached (hot unplug), the device's alignment is left
behind. Only okay because device hot unplug automatically destroys
the BlockDriverState. But that's a questionable feature, best not to
rely on it.
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/block.c b/block.c
index e986986..b006e58 100644
--- a/block.c
+++ b/block.c
@@ -788,6 +788,7 @@ void bdrv_detach_dev(BlockDriverState *bs, void *dev)
bs->dev = NULL;
bs->dev_ops = NULL;
bs->dev_opaque = NULL;
+ bs->buffer_alignment = 512;
}
/* TODO change to return DeviceState * when all users are qdevified */
--
1.7.6
- [Qemu-devel] [PATCH 10/35] block: Drop tray status tracking, no longer used, (continued)
- [Qemu-devel] [PATCH 10/35] block: Drop tray status tracking, no longer used, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 09/35] block: Revert entanglement of bdrv_is_inserted() with tray status, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 13/35] block: Leave enforcing tray lock to device models, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 14/35] block: Drop medium lock tracking, ask device models instead, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 16/35] rbd: allow client id to be specified in config string, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 21/35] ide/atapi: Preserve tray state on migration, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 12/35] scsi-disk: Track tray locked state, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 15/35] block: Rename bdrv_set_locked() to bdrv_lock_medium(), Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 22/35] block: Clean up remaining users of "removable", Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 20/35] scsi-disk: Fix START_STOP to fail when it can't eject, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 28/35] block: Reset buffer alignment on detach,
Kevin Wolf <=
- [Qemu-devel] [PATCH 24/35] block: Show whether the virtual tray is open in info block, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 31/35] ide/atapi scsi-disk: Make monitor eject -f, then change work, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 35/35] qcow2: fix range check, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 34/35] qcow2: align cluster_data to block to improve performance using O_DIRECT, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 19/35] ide/atapi: Don't fail eject when tray is already open, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 25/35] block: Move BlockConf & friends from block_int.h to block.h, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 26/35] hw: Trim superfluous #include "block_int.h", Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 30/35] block: New change_media_cb() parameter load, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 32/35] qcow2: initialize metadata before inserting in cluster_allocs, Kevin Wolf, 2011/09/12
- [Qemu-devel] [PATCH 23/35] block: Drop BlockDriverState member removable, Kevin Wolf, 2011/09/12