Re: [Qemu-devel] [PATCH v2] vmdk: align end of file to a sector boundary

2018-09-13 Thread Fam Zheng
On Thu, 09/13 15:47, yuchenlin wrote: > On 2018-09-13 10:54, Fam Zheng wrote: > > On Thu, 09/13 10:31, yuchen...@synology.com wrote: > > > From: yuchenlin > > > > > > There is a rare case which the size of last compressed cluster > > > is larger than the cluster size, which will cause the file is

Re: [Qemu-devel] [PATCH v2] vmdk: align end of file to a sector boundary

2018-09-13 Thread yuchenlin via Qemu-devel
On 2018-09-13 10:54, Fam Zheng wrote: On Thu, 09/13 10:31, yuchen...@synology.com wrote: From: yuchenlin There is a rare case which the size of last compressed cluster is larger than the cluster size, which will cause the file is not aligned at the sector boundary. The code looks good to me.

Re: [Qemu-devel] [PATCH v2] vmdk: align end of file to a sector boundary

2018-09-12 Thread Fam Zheng
On Thu, 09/13 10:31, yuchen...@synology.com wrote: > From: yuchenlin > > There is a rare case which the size of last compressed cluster > is larger than the cluster size, which will cause the file is > not aligned at the sector boundary. The code looks good to me. Can you also explain why it is

[Qemu-devel] [PATCH v2] vmdk: align end of file to a sector boundary

2018-09-12 Thread yuchenlin--- via Qemu-devel
From: yuchenlin There is a rare case which the size of last compressed cluster is larger than the cluster size, which will cause the file is not aligned at the sector boundary. Signed-off-by: yuchenlin --- v1 -> v2: * Add more detail comment. * Add QEMU_ALIGN_UP to show the intention more clear