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

2016-10-25 Thread Haozhong Zhang
On 10/25/16 17:30 -0200, Eduardo Habkost wrote: On Mon, Oct 24, 2016 at 05:21:50PM +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 1/2] exec.c: do not truncate non-empty memory backend file

2016-10-25 Thread Eduardo Habkost
On Mon, Oct 24, 2016 at 05:21:50PM +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 1/2] exec.c: do not truncate non-empty memory backend file

2016-10-24 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