Re: [PATCH v4 10/11] fs/9p: writeback mode fixes

asmadeus
2023-02-18T20:30:05Z

Eric Van Hensbergen wrote on Sat, Feb 18, 2023 at 10:40:27AM -0600:
> This is stupidity on my part, but can you send me your setup for
> fscache so I can test the way you are testing it? It is the one thing
> I still haven't incorporated into my test matrix so definitely a blind
> spot I appreciate you exposing.

I mounted with fscache but I didn't actually have a backend running when
testing, so there's really not setup involved -- just qemu's
'-virtfs local,path=/tmp/linux-test,mount_tag=tmp,security_model=mapped-file'
and
'mount -t 9p -o debug=1,cache=fscache,trans=virtio tmp /mnt'

In that case, fscache basically acts like loose, except it also does all
its cookies stuff so it's sort of useful to test anyway.

I also have a setup that runs cachefilesd on top but it wasn't involved
here; for completeness if you want to test:
- add an extra disk to qemu
qemu-img create -f qcow2 /tmp/disk 1G
'-device virtio-blk-pci,drive=hd0 -drive if=none,file=/tmp/disk,snapshot=on,id=hd0'
- just runs cachefilesd (ignore hardcoded nix paths, that's my easy way out
of running straight out of initrd without making it huge):
---
if [ -e /dev/vda ]; then
/run/current-system/sw/bin/mkfs.ext4 -q /dev/vda
mkdir /cache /var/run
mount /dev/vda /cache
echo -e 'dir /cache\ntag cache' > /etc/cachefilesd.conf
echo 'modprobe cachefiles'
echo '/nix/store/4vy0z1ygfidfmbzaxblkmzv7j0irhhwc-cachefilesd-0.10.10/bin/cachefilesd -s -d > /cache/log 2>&1'
fi
---
And that's basically it; you should see files poping up in /dev/vda when
you do reads (iirc writes weren't cached through last I looked)
--
Dominique