qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] hd-geo-test creates 4GB files on FSes that don't suppor


From: John Snow
Subject: Re: [Qemu-devel] hd-geo-test creates 4GB files on FSes that don't support sparse images, doesn't delete them on error
Date: Mon, 31 Aug 2015 14:54:10 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0


On 08/28/2015 09:06 AM, Markus Armbruster wrote:
> John Snow <address@hidden> writes:
> 
>> On 08/27/2015 11:29 AM, Eric Blake wrote:
>>> On 08/27/2015 09:17 AM, Peter Maydell wrote:
>>>> I've noticed recently that tests/hd-geo-test.c creates test disk
>>>> images which are 4GB in size, which is a problem if the filesystem
>>>> on the host doesn't support sparse files. In particular, OSX's HFS+
>>>> doesn't have sparse file support, and Windows probably doesn't either.
>>>
>>> Windows NTFS supports sparse files (minimum hole size of 64k), but it
>>> can be a pain to set up, and while it saves disk space, it may actually
>>> slow your program down.
>>>
>>> [At one point cygwin created sparse files on windows by default, but
>>> because it was demonstrated to hurt performance in dealing with sparse
>>> files, because Windows doesn't handle sparse files efficiently, the
>>> cygwin defaults were switched so that it now requires an explicit opt-in
>>> mount option before even attempting sparse files]
>>>
>>>> Worse, if the test fails an assertion somewhere the test doesn't
>>>> clean up after itself and leaves a 4GB file lying around in /tmp/.
>>>>
>>>> It would be nice if we could skip these tests on filesystems that
>>>> don't have sparse file support...
>>>
>>> Or even where sparse files are supported but not default.
>>>
>>
>> Does this test *require* the raw format?
> 
> If memory serves, the test doesn't require a specific format, only the
> size and the contents of the MBR matters.
> 
>> Use tests/libqos/libqos.c mkqcow2 instead. I'll send a patch.
> 
> Go right ahead.
> 

Oh, taking a look at it, it needs to writethat MBR data to the file
before it opens it. We don't have an existing qemu-io dependency here to
use.

I could add it, but the line between iotest and qtest starts to get
pretty fuzzy.

Thoughts?

--js



reply via email to

[Prev in Thread] Current Thread [Next in Thread]