Closed bergwolf closed 6 years ago
Nice work @bergwolf I'd not realised that the unlink patch to 9p made us worse on the posix tests... Having a peek at the kernel 9p docs, it says:
mmap = minimal cache that is only used for read-write
mmap. Northing else is cached, like cache=none
Your results make me feel that maybe it is not quite that simple, but gives me confidence that we are unlikely to have broken anything else. So, the idea looks sound to me.
@grahamwhaley yeah, that patch is never a clean fix but just a dirty hack workaround :) For a clean fix, it should be addressed on the protocol layer and fix both 9p client and server. The kernel community has discussed it many times but didn't come to a real fix... OTOH, pjdfstest is clearly not testing all POSIX fs semantics and it seems to be missing important semantics some daily apps rely on (like the mmap one).
Summary
I have done a some compatibility tests for kata 9pfs and I think we should change 9pfs mount option from default
cache=none
tocache=mmap
. It does not give worse POSIX compliance (compared to cache=none) but allows us to rundnf install
andmariadb:latest
images.We still need the 9pfs open-delete-fstat workaround. Even though it gives worse fstest results but it works around some important common usages otherwise we'll fail both
apt update
andmariadb:latest
.0. test setup
0.0 check storage driver
0.1 clone pjdfstest:
git clone git@github.com:pjd/pjdfstest.git
0.2 run docker:
docker run -it -v /path/to/pjdfstest:/fstest ubuntu
0.3 run kata:
docker run -it --runtime kata -v /path/to/pjdfstest:/fstest ubuntu
0.4 run
apt update
test:docker run --runtime kata -it --rm ubuntu apt update
0.5 run
dnf install -y strace
test:docker run --runtime kata -it --rm fedora dnf install -y strace
0.6 run mariadb test:
docker run --runtime kata --rm -it --env MYSQL_ALLOW_EMPTY_PASSWORD=yes mariadb
1. docker with overlayfs
2. kata 9pfs(cache=none)/overlayfs/upstream-guest-kernel-4.14.29
However, it fails
apt update
:And it fails to run
dnf update
And it fails to run mariadb:
3. kata 9pfs(cache=mmap)/overlayfs/upstream-guest-kernel-4.14.29
However, it fails
apt update
:And it fails to run mariadb:
4. kata 9pfs(cache=none)/overlayfs/patched-9p
And if fails to run
dnf install
:And it fails to run mariadb:
5. kata 9pfs(cache=mmap)/overlayfs/patched-9p