[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 0/5] block: Drop BDS.filename
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v3 0/5] block: Drop BDS.filename |
Date: |
Thu, 13 Aug 2015 17:30:34 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 12.08.2015 um 17: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.
Apart from patch 2:
Reviewed-by: Kevin Wolf <address@hidden>
- [Qemu-devel] [PATCH v3 0/5] block: Drop BDS.filename, Max Reitz, 2015/08/12
- [Qemu-devel] [PATCH v3 1/5] block: Change bdrv_get_encrypted_filename(), Max Reitz, 2015/08/12
- [Qemu-devel] [PATCH v3 2/5] block: Avoid BlockDriverState.filename, Max Reitz, 2015/08/12
- [Qemu-devel] [PATCH v3 3/5] block: Add bdrv_filename(), Max Reitz, 2015/08/12
- [Qemu-devel] [PATCH v3 5/5] iotests: Test changed Quorum filename, Max Reitz, 2015/08/12
- [Qemu-devel] [PATCH v3 4/5] block: Drop BlockDriverState.filename, Max Reitz, 2015/08/12
- Re: [Qemu-devel] [PATCH v3 0/5] block: Drop BDS.filename,
Kevin Wolf <=