aboutsummaryrefslogtreecommitdiff
path: root/block.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-12-16 19:36:31 +0100
committerKevin Wolf <kwolf@redhat.com>2010-12-17 16:11:03 +0100
commitbb8bf76fb1c4afa116a7f11fee559b3cca671a4a (patch)
tree3869081b39a96da24bff96e06099794960dd9ccf /block.h
parent61d9d6b091aa04e5e5bd20951aa689a5bbe65aed (diff)
block: add discard support
Add a new bdrv_discard method to free blocks in a mapping image, and a new drive property to set the granularity for these discard. If no discard granularity support is set discard support is disabled. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.h')
-rw-r--r--block.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/block.h b/block.h
index b812172735..f923add60d 100644
--- a/block.h
+++ b/block.h
@@ -146,6 +146,7 @@ int bdrv_flush(BlockDriverState *bs);
void bdrv_flush_all(void);
void bdrv_close_all(void);
+int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors);
int bdrv_has_zero_init(BlockDriverState *bs);
int bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors,
int *pnum);