3 ms·
I’m not familiar with the feature at all but I wonder whether your suggested alternative API would be powerful enough to atomically do things like: 1. Find the
by Hackbraten 5y ago
I’m not familiar with the feature at all but I wonder whether your suggested alternative API would be powerful enough to atomically do things like:
1. Find the latest three snapshots, and then
2. delete those three snapshots.
With a generic API, that’d take two calls, with a possible TOCTOU in between so it wouldn’t be atomic.
But if you send that same program to the ZFS subsystem, and have it evaluate and execute the script, the subsystem would be able to guarantee atomicity, right?
- throwaway2048 5y agoit seems pretty trivial to just have some kind of "begin/end atomic section" flag or function rather than jamming in a whole special purpose scripting enviroment.
- infogulch 5y agobegin() loop {}
- Hackbraten 5y ago> If the channel program exhausts an instruction or memory limit, a fatal error will be generated and the program will be stopped
- Hackbraten 5y agoBut what is the API supposed to do when it comes across a `begin` flag? Stop all filesystem activity in all programs until yours sends the `end` flag? What if that flag never arrives, e.g. due to a bug in your client code?
- throwaway2048 5y agodelay all commits to disk until a fixed timeout is reached for command submission, if the timeout is reached the call returns failed, the same problem exists with this special purpose scripting environment just in other forms.