Hi All,
Could someone review please. ? :)
Thanks in advance,
Shivaprasad
On Wed, May 31, 2017 at 12:26 PM, Shivaprasad bhat <
shivaprasadbhat(a)gmail.com> wrote:
Hi All,
Can someone review the patch please ?
Thanks,
Shivaprasad
On Wed, Mar 15, 2017 at 11:22 AM, Shivaprasad bhat <
shivaprasadbhat(a)gmail.com> wrote:
> ping..
>
> On Fri, Jan 27, 2017 at 4:29 PM, Shivaprasad G Bhat <
> sbhat(a)linux.vnet.ibm.com> wrote:
>
>> Commit afe6e58 & c4caab53 made necessary changes to use io-helpers
>> during save and restore. The commit c4caab53 missed to remove the
>> redundant check in qemuDomainSaveImageOpen() because of which
>> virFileWrapperFdNew() is not called if bypass_cache is false.
>>
>> Signed-off-by: Shivaprasad G Bhat <sbhat(a)linux.vnet.ibm.com>
>> ---
>> src/qemu/qemu_driver.c | 7 ++++---
>> 1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>> index 516a851..ac89372 100644
>> --- a/src/qemu/qemu_driver.c
>> +++ b/src/qemu/qemu_driver.c
>> @@ -6150,9 +6150,11 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
>> virDomainDefPtr def = NULL;
>> int oflags = open_write ? O_RDWR : O_RDONLY;
>> virCapsPtr caps = NULL;
>> + unsigned int wrapperFlags = VIR_FILE_WRAPPER_NON_BLOCKING;
>>
>> if (bypass_cache) {
>> int directFlag = virFileDirectFdFlag();
>> + wrapperFlags |= VIR_FILE_WRAPPER_BYPASS_CACHE;
>> if (directFlag < 0) {
>> virReportError(VIR_ERR_OPERATION_FAILED, "%s",
>> _("bypass cache unsupported by this
>> system"));
>> @@ -6166,9 +6168,8 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
>>
>> if ((fd = qemuOpenFile(driver, NULL, path, oflags, NULL, NULL)) < 0)
>> goto error;
>> - if (bypass_cache &&
>> - !(*wrapperFd = virFileWrapperFdNew(&fd, path,
>> - VIR_FILE_WRAPPER_BYPASS_CACHE
>> )))
>> + if (wrapperFd &&
>> + !(*wrapperFd = virFileWrapperFdNew(&fd, path, wrapperFlags)))
>> goto error;
>>
>> if (saferead(fd, &header, sizeof(header)) != sizeof(header)) {
>>
>> --
>> libvir-list mailing list
>> libvir-list(a)redhat.com
>>
https://www.redhat.com/mailman/listinfo/libvir-list
>>
>
>