[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v6 4/9] block: Do not blindly copy filename from
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [PATCH v6 4/9] block: Do not blindly copy filename from file |
Date: |
Mon, 16 Jan 2017 14:48:19 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
On 01/13/2017 02:52 PM, Max Reitz wrote:
> bdrv_refresh_filename() can do the same and it has some checks whether
> the filename can actually be inherited or not, so we can let it do its
> job in bdrv_open_inherit() after bdrv_open_common() has been called.
>
> The only thing we need to set in bdrv_open_common() is the
> exact_filename of a BDS without an underlying file, for two reasons:
> (1) It cannot be inherited from an underlying file BDS, so it has to be
> set somewhere.
> (2) The driver may need the filename in its bdrv_file_open()
> implementation (format drivers do not need their own filename,
> though they may need their file BDS's name).
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> block.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH v6 0/9] block: Drop BDS.filename, Max Reitz, 2017/01/13
- [Qemu-block] [PATCH v6 1/9] block: Always set *file in get_block_status, Max Reitz, 2017/01/13
- [Qemu-block] [PATCH v6 2/9] block: Change bdrv_get_encrypted_filename(), Max Reitz, 2017/01/13
- [Qemu-block] [PATCH v6 3/9] block: Avoid BlockDriverState.filename, Max Reitz, 2017/01/13
- [Qemu-block] [PATCH v6 4/9] block: Do not blindly copy filename from file, Max Reitz, 2017/01/13
- Re: [Qemu-block] [PATCH v6 4/9] block: Do not blindly copy filename from file,
Eric Blake <=
- [Qemu-block] [PATCH v6 5/9] block: Add bdrv_filename(), Max Reitz, 2017/01/13
- [Qemu-block] [PATCH v6 9/9] iotests: Test changed Quorum filename, Max Reitz, 2017/01/16
- [Qemu-block] [PATCH v6 8/9] block: Complete move to pull filename updates, Max Reitz, 2017/01/16
- [Qemu-block] [PATCH v6 7/9] block: Drop BlockDriverState.filename, Max Reitz, 2017/01/16
- [Qemu-block] [PATCH v6 6/9] qemu-img: Use bdrv_filename() for map, Max Reitz, 2017/01/16
- Re: [Qemu-block] [PATCH v6 0/9] block: Drop BDS.filename, Max Reitz, 2017/01/16