Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The problem with filesystems is that they don't usually support transactions. For example, it is not possible to atomically change two files, without resorting to ugly and dangerous hacks.


Plan 9 came close. You could create /foo/a and /foo/b at your leisure, then bind /foo over /etc. This atomically replaced /etc/a and /etc/b with /foo/a and /foo/b, for the purposes of open. The change could be atomically reverted with unmount.

If that wasn't good enough, then /etc/a and /etc/b could be virtual files served by the same daemon. This could look for change sets written to /dev/patch, and block reads and writes while it applied them.


Right. If you're changing the configuration of a live system, you often want to do it atomically. Databases are designed for that. They also support search operations and have indexes, which get updated as the data changes.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: