[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
Dr. David Alan Gilbert
Re: [PATCH 097/104] virtiofsd: Fix data corruption with O_APPEND wirte in writeback mode
Tue, 7 Jan 2020 13:27:43 +0000
* Daniel P. Berrangé (address@hidden) wrote:
> 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've got some github CI setup, but not too much automatic of as yet.
As you spotted in another patch we need root to run this at the moment
which makes life harder; we also need a full guest to drive fuse
> 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>
> |: 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 :|
Dr. David Alan Gilbert / address@hidden / Manchester, UK