summary refs log tree commit diff stats
path: root/scripts/update-linux-headers.sh
diff options
context:
space:
mode:
authorMisono Tomohiro <misono.tomohiro@jp.fujitsu.com>2019-10-23 21:25:23 +0900
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-01-23 16:41:37 +0000
commit8e4e41e39eac5ee5f378d66f069a2f70a1734317 (patch)
tree97438c5efe0cffbb78899314557c712a9c625068 /scripts/update-linux-headers.sh
parent65da4539803373ec4eec97ffc49ee90083e56efd (diff)
downloadfocaccia-qemu-8e4e41e39eac5ee5f378d66f069a2f70a1734317.tar.gz
focaccia-qemu-8e4e41e39eac5ee5f378d66f069a2f70a1734317.zip
virtiofsd: Fix data corruption with O_APPEND write in writeback mode
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).

Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'scripts/update-linux-headers.sh')
0 files changed, 0 insertions, 0 deletions