Re: [Qemu-devel] [PATCH v2 1/3] exec.c: do not truncate non-empty memory backend file

2016-10-31 Thread Eduardo Habkost
On Fri, Oct 28, 2016 at 10:07:40AM +0800, Haozhong Zhang wrote: > On 10/27/16 12:31 -0200, Eduardo Habkost wrote: > > On Thu, Oct 27, 2016 at 12:22:58PM +0800, Haozhong Zhang wrote: > > > For '-object memory-backend-file,mem-path=foo,size=xyz', if the size of > > > file 'foo' does not match the giv

Re: [Qemu-devel] [PATCH v2 1/3] exec.c: do not truncate non-empty memory backend file

2016-10-27 Thread Haozhong Zhang
On 10/27/16 12:31 -0200, Eduardo Habkost wrote: On Thu, Oct 27, 2016 at 12:22:58PM +0800, Haozhong Zhang wrote: For '-object memory-backend-file,mem-path=foo,size=xyz', if the size of file 'foo' does not match the given size 'xyz', the current QEMU will truncate the file to the given size, which

Re: [Qemu-devel] [PATCH v2 1/3] exec.c: do not truncate non-empty memory backend file

2016-10-27 Thread Eduardo Habkost
On Thu, Oct 27, 2016 at 12:22:58PM +0800, Haozhong Zhang wrote: > For '-object memory-backend-file,mem-path=foo,size=xyz', if the size of > file 'foo' does not match the given size 'xyz', the current QEMU will > truncate the file to the given size, which may corrupt the existing data > in that file

[Qemu-devel] [PATCH v2 1/3] exec.c: do not truncate non-empty memory backend file

2016-10-26 Thread Haozhong Zhang
For '-object memory-backend-file,mem-path=foo,size=xyz', if the size of file 'foo' does not match the given size 'xyz', the current QEMU will truncate the file to the given size, which may corrupt the existing data in that file. To avoid such data corruption, this patch disables truncating non-empt