* [Virtio-fs] [virtiofsd] Issue opened: Unexpected behavior observed when using mmap on virtiofs backed paths
@ 2022-11-10 14:51 virtiofs-bot
0 siblings, 0 replies; only message in thread
From: virtiofs-bot @ 2022-11-10 14:51 UTC (permalink / raw)
To: virtio-fs
When using python and writing to a mmap file, I am seeing with cache mode auto and always that the file is increasing in size each time I write to it. This is seen with virtiofsd C version ( 6.1.0 ) as well as RS version (1.3.0), and can be reproduced using QEMU (6.2) as well as Cloud Hypervisor (v0.26). When switching to a different vhost-user-fs backend (nydusd), we can no longer reproduce the failure.
The following python script will show the failure behavior if run on a virtiofs backed path:
```
import mmap
import struct
l = 1024
f = open("./test.db", "a+b")
f.truncate(l)
m = mmap.mmap(f.fileno(), 1024, access=mmap.ACCESS_WRITE)
m[0:4] = b"0000"
m.flush()
m.size()
m[0:4] = b"0000"
m.flush()
m.size()
```
See https://github.com/kata-containers/kata-containers/issues/5634 for more details on reproduction.
---
https://gitlab.com/virtio-fs/virtiofsd/-/issues/67
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-10 14:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10 14:51 [Virtio-fs] [virtiofsd] Issue opened: Unexpected behavior observed when using mmap on virtiofs backed paths virtiofs-bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.