qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/4] block: Drop BDS.filename


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH 0/4] block: Drop BDS.filename
Date: Tue, 03 Feb 2015 08:48:40 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 2015-02-03 at 04:32, Kevin Wolf wrote:
Am 24.09.2014 um 21:48 hat Max Reitz geschrieben:
The BDS filename field is generally only used when opening disk images
or emitting error or warning messages, the only exception to this rule
is the map command of qemu-img. However, using exact_filename there
instead should not be a problem. Therefore, we can drop the filename
field from the BlockDriverState and use a function instead which builds
the filename from scratch when called.

This is slower than reading a static char array but the problem of that
static array is that it may become obsolete due to changes in any
BlockDriverState or in the BDS graph. Using a function which rebuilds
the filename every time it is called resolves this problem.

The disadvantage of worse performance is negligible, on the other hand.
After patch 2 of this series, which replaces some queries of
BDS.filename by reads from somewhere else (mostly BDS.exact_filename),
the filename field is only used when a disk image is opened or some
message should be emitted, both of which cases do not suffer from the
performance hit.
Surprisingly (or not), this one needs rebasing.

Well...

I tried it and it doesn't look too hard, but it's a little bit more than
what I'm comfortable with doing while applying a series.

I admire your courage, but I'm not sure whether this series is ready for being applied at all. First we (or I) will have to look into how users like libvirt which identify a BDS based on the filename can break from applying this series.

Max



reply via email to

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