The shrinking role of ETXTBSY
The shrinking role of ETXTBSY
Posted Aug 19, 2021 23:15 UTC (Thu) by SLi (subscriber, #53131)In reply to: The shrinking role of ETXTBSY by nybble41
Parent article: The shrinking role of ETXTBSY
Posted Aug 20, 2021 5:57 UTC (Fri)
by nybble41 (subscriber, #55106)
[Link] (2 responses)
Atomically swapping the *content* of two files (one of which could be temporary/unlinked) could be a useful operation for some cases which currently rely on atomic rename, and wouldn't have any issue with read-only directories, but it wouldn't help in this particular situation since any existing open file descriptions or mapped memory would immediately see the new content just as if the file had been modified with ftruncate(2) and write(2).
Posted Aug 20, 2021 17:47 UTC (Fri)
by smurf (subscriber, #17840)
[Link] (1 responses)
This will cause all kinds of interesting race conditions unless handled carefully … but it could work.
Posted Aug 22, 2021 8:35 UTC (Sun)
by NYKevin (subscriber, #129325)
[Link]
(Because, well, what's the alternative? Any global mutable state will inevitably race, at some level of abstraction, and global mutable state is literally the whole point of a filesystem.)
Posted Aug 20, 2021 6:42 UTC (Fri)
by pbonzini (subscriber, #60935)
[Link]
The shrinking role of ETXTBSY
The shrinking role of ETXTBSY
The shrinking role of ETXTBSY
The shrinking role of ETXTBSY
