qemu-devel
[Top][All Lists]
Advanced

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

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


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH v2 1/3] exec.c: do not truncate non-empty memory backend file
Date: Mon, 31 Oct 2016 15:21:59 -0200
User-agent: Mutt/1.7.0 (2016-08-17)

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 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-empty backend files.
> > > 
> > > Signed-off-by: Haozhong Zhang <address@hidden>
> > 
> > Reviewed-by: Eduardo Habkost <address@hidden>
> > 
> > But I would add comment near the get_file_size() call to indicate
> > that not stopping on get_file_size() errors is on purpose and not
> > a mistake.
> > 
> 
> I'll add comments in the next version.
> 

The patch was applied to machine-next and will be in my next pull
request. The comment can be sent as a follow-up patch.

-- 
Eduardo



reply via email to

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