aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/nfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/nfs.c b/block/nfs.c
index 385d756e1d..76daa7c9f6 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -620,6 +620,9 @@ static int nfs_file_open(BlockDriverState *bs, QDict *options, int flags,
}
bs->total_sectors = ret;
+ if (client->has_zero_init) {
+ bs->supported_truncate_flags = BDRV_REQ_ZERO_WRITE;
+ }
return 0;
}