qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 097/104] virtiofsd: Fix data corruption with O_APPEND wirte i


From: Daniel P . Berrangé
Subject: Re: [PATCH 097/104] virtiofsd: Fix data corruption with O_APPEND wirte in writeback mode
Date: Tue, 7 Jan 2020 12:20:07 +0000
User-agent: Mutt/1.12.1 (2019-06-15)

On Thu, Dec 12, 2019 at 04:38:57PM +0000, Dr. David Alan Gilbert (git) wrote:
> From: Misono Tomohiro <address@hidden>
> 
> When writeback mode is enabled (-o writeback), O_APPEND handling is
> done in kernel. Therefore virtiofsd clears O_APPEND flag when open.
> Otherwise O_APPEND flag takes precedence over pwrite() and write
> data may corrupt.
> 
> Currently clearing O_APPEND flag is done in lo_open(), but we also
> need the same operation in lo_create(). So, factor out the flag
> update operation in lo_open() to update_open_flags() and call it
> in both lo_open() and lo_create().
> 
> This fixes the failure of xfstest generic/069 in writeback mode
> (which tests O_APPEND write data integrity).

Seeing this mention of xfstest reminds me that there are no tests
added anywhere in this patch series.  Is there another followup
pending with tests or is it a todo item ?

We can usefully wire up this xfstest program in the functional
tests of QEMU in some way ?

> 
> Signed-off-by: Misono Tomohiro <address@hidden>
> ---
>  tools/virtiofsd/passthrough_ll.c | 66 ++++++++++++++++----------------
>  1 file changed, 33 insertions(+), 33 deletions(-)

Reviewed-by: Daniel P. Berrangé <address@hidden>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

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