https://bugzilla.redhat.com/show_bug.cgi?id=1886816
--- Comment #22 from Simo Sorce <ssorce(a)redhat.com> ---
The only good way to handle this is to change how we open the memory mapped
files.
Instead of opening them directly from the client, we need to introduce a new
command call over the pipe that will ask the parent to open them for us, and
then pass the fd over the socket to the client.
This method has a few advantages:
- clients will not be allowed to directly open mmapped files which means the
only thing to bind mount over (for stuff like container access) is the sockets.
- the server can simply create new files when needed and just *mark* the old
files as obsoleted before simply renaming them or even unlink() them on the
spot.
- the server can move the cache files at will. for Example it can decide to
create them on tmpfs for speed on machines where populating the cache at every
reboot is ok, while keeping them on long lived storage for machines (like
laptops) that are frequently rebooting in disconnected mode and need to
preserve the caches.
Once this is done, the only case of encountering a truncated() file in the
client is generally a server bug. The server should never change the size of
the cache files, it should always mark and rename/unlink an old cache and
create a new one instead.
--
You are receiving this mail because:
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=1886816