3 ms·
Yeah, it seems like the kind of command that you only need because of a quirk in how the underlying system happens to work. Not something that should pollute th
by teawrecks 5y ago
Yeah, it seems like the kind of command that you only need because of a quirk in how the underlying system happens to work. Not something that should pollute the logic of the command, imo. I would expect a copy-on-write filesystem to be able to do this automatically for free.
- paulmd 5y ago> I would expect a copy-on-write filesystem to be able to do this automatically for free. this is an artifact of how handles work (in relation to concurrency), not the filesystem. copy-on-write still guarantees a consistent view of the data, so if you write on one handle you're going to clobber the data on the other, because that's what's in the file. what you really want is an operator which says "I want this handle to point to the original snapshot of this data even if it's changed in the meantime", which a CoW filesystem could do, but you'd need some additional semantics here (different access-mode flag?) which isn't trivially granted just by using a CoW filesystem underneath.
- caymanjim 5y agoDo people really use copy-on-write filesystems though? I mean it'd be great if that were a default, but I rarely encounter them, and when I do, it's only because someone intentionally set it up that way. In 30+ years of using Unix systems, I can't even definitively recall one of them having a copy-on-write filesystem in place. Which is insane considering I used VAX/VMS systems before that and it was standard there.
- mjochim 5y agoHuh? Btrfs is copy on write and it's definitely being used.
- r3trohack3r 5y agoFreeBSD uses ZFS by default, which is copy on write post-snapshot.