On 25/10/2016 14:03, Peter Lieven wrote: > Am 01.08.2016 um 11:22 schrieb Paolo Bonzini: >> >> On 28/07/2016 04:39, Eric Blake wrote: >>> On 07/27/2016 01:25 AM, Fam Zheng wrote: >>>> On Thu, 07/21 13:34, Eric Blake wrote: >>>>> + max_write_zeroes = max_write_zeroes / alignment * alignment; >>>> Not using QEMU_ALIGN_DOWN despite patch 3? >>> Looks like I missed that on the rebase. Can fix if there is a reason for >>> a respin. >> Since Stefan acked this, I'm applying the patch and fixing it to use >> QEMU_ALIGN_DOWN. >> >> Paolo > > Hi, > > I came across a sort of regression we introduced with the dropping of > head and tail > of an unaligned discard. > > The discard alignment that we use to trim the discard request is just a > hint. > > I learned on the equallogics that a page (which is this unusal 15MB > large) is > unallocated even if the discard happens in pieces. E.g. in slices of 1MB > requests. > > From my point of view I would like to restore the old behaviour. What do > you think?
The right logic should be the one in Linux: if splitting a request, and the next starting sector would be misaligned, stop the discard at the previous aligned sector. Otherwise leave everything alone. Paolo