qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH for-4.0?] nbd/client: Deal with unaligned size f


From: Eric Blake
Subject: Re: [Qemu-block] [PATCH for-4.0?] nbd/client: Deal with unaligned size from server
Date: Thu, 28 Mar 2019 23:30:50 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0

On 3/28/19 7:36 AM, Kevin Wolf wrote:

>>>
>>> I think making the behaviour inconsistent across different block
>>> drivers, so that some round up and some round down, is a bad idea.
>>> Even without the inconsistency, rounding down is already a bad idea
>>> because it means data loss when you copy the disk.
>>
>> Concur, truncation is safe, but surprising when it is not done
>> consistently (and we're too late to switch away from our current
>> behavior of rounding up).
>>

>> Option 3:
>>
>> Teach the nbd code to special-case past-EOF read and block-status to do
>> the right thing, but not worry about write/write-zero/trim (those will
>> fail, but that's less important for qemu-img convert).
>>
>> I'll post a v2 patch along those lines.
> 
> This would be similar to what file-posix does for short reads (just adds
> zero padding), so it should be reasonable to do the same in NBD. This is
> probably the nicest option.

Now posted: Message-Id: <address@hidden>
Subject: [PATCH for-4.0 v3 0/6] NBD server alignment improvement

I think there's still a bug in the blkdebug driver for letting unaligned
block status leak back to the block layer, but I'm out of time to
investigate that today, and blkdebug is not used in production images,
so it's less urgent.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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