Skip to contentSkip to conversation

Revert "block: complete all IOs before .bdrv_truncate"

PATCH Applied Peter Lieven 2 participants 2 messages Mar 11, 2013 – Mar 19, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 Revert "block: complete all IOs before .bdrv_truncate"

brdv_truncate() is also called from readv/writev commands on self- growing file based storage. this will result in requests waiting for theirselves to complete.

This reverts commit 9a665b2b8640e464f0a778216fc2dca8d02acf33.

---
 block.c |    4 ----
 1 file changed, 4 deletions(-)
block.c +0 -4
index 124a9eb..60c246a 100644
@@ -2449,10 +2449,6 @@ int bdrv_truncate(BlockDriverState *bs, int64_t offset)
         return -EACCES;
     if (bdrv_in_use(bs))
         return -EBUSY;
-
-    /* There better not be any in-flight IOs when we truncate the device. */
-    bdrv_drain_all();
-
     ret = drv->bdrv_truncate(bs, offset);
     if (ret == 0) {
         ret = refresh_total_sectors(bs, offset >> BDRV_SECTOR_BITS);
Signature · 1 line
1.7.9.5
Applied
#1 lore raw

Am 11.03.2013 um 11:03 hat Peter Lieven geschrieben:

Quoted 5 lines

brdv_truncate() is also called from readv/writev commands on self- growing file based storage. this will result in requests waiting for theirselves to complete.

This reverts commit 9a665b2b8640e464f0a778216fc2dca8d02acf33.

Thanks, applied to the block branch.

Kevin