|
|
Subscribe / Log in / New account

An operation for filesystem tucking

An operation for filesystem tucking

Posted Apr 9, 2023 7:49 UTC (Sun) by NYKevin (subscriber, #129325)
In reply to: An operation for filesystem tucking by smurf
Parent article: An operation for filesystem tucking

To be fair, the classic (pre-container) way to do this is to flip a symlink, and that really is perfectly atomic.

One wonders why userspace container systems don't just put a symlink inside of the filesystem image. You could have, for example, two mount points A and B, and a symlink to whichever mount point is currently in use. When you want to upgrade to a new version, you mount it on the other mount point, and then flip the symlink. Perhaps the container software doesn't want to dictate the use of such symlinks? But that seems like a rather... insubstantial reason to make this the kernel's problem, IMHO.


to post comments

An operation for filesystem tucking

Posted Apr 9, 2023 10:46 UTC (Sun) by smurf (subscriber, #17840) [Link]

If you flip that symlink while a program is starting up it'll get some libraries from A and others from B, which may cause it to crash. So in that sense it's definitely not atomic. The same problem applies to a mount-on-top operation.

On the other hand if you have a tuck-mount you can do an atomic unmount afterwards, but only if there's no current user. That guarantees that you don't run into inconsistent libraries et al. even when you can't control exactly when a program (re)starts.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds