[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] block: Review of .has_zero_init use
From: |
Peter Lieven |
Subject: |
Re: [Qemu-devel] block: Review of .has_zero_init use |
Date: |
Wed, 26 Jun 2013 07:59:27 +0200 |
Am 26.06.2013 um 05:14 schrieb Bharata B Rao <address@hidden>:
> On Tue, Jun 25, 2013 at 01:39:11PM +0200, Kevin Wolf wrote:
>>
>> Can you please review for the gluster, rbd, sheepdog and ssh driver
>> whether it's safe to assume that the image reads back as zeros after
>> bdrv_create?
>
> Gluster supports both file and block backends. While the above is true for
> file backend (which uses ftruncate), the same is not true for
> block backend (which uses lvcreate & lvresize).
>
> So overall it is not safe to assume that an image on GlusterFS volume
> reads back as zeroes after create.
Okay, so for safety we have to return has_zero_init = 0. Erroneously assuming
a device is zero initialized can bring severe filesystem corruption.
Do you see a way to query the information of the underlaying
backend from the storage and return 1 or 0 conditionally?
Peter