Re: Request for feedback: Filesystem API

Domenic Denicola wrote:
> A new concern, which this time I'll phrase as a question---is moving, or removing, a directory atomic?

Atomic, and idempotent (at most once). This was an issue with NFS in the 
past. Its "stateless" simplicity was a bit of a fraud, given the need 
for an "idempotency cache" in the server to avoid retransmitted unlink 
(remove) operations.

Unix semantics should mean unlinking a node (leaf file, regular or 
special; directory) is atomic and idempotent. Do we care about other 
filesystems' semantics? Allen invoked POSIX and I mentioned Unix as OS 
category-killer status, so I hope not!

Someone mentioned corruption later. This is not supposed to be visible 
to usercode. Of course, it happens. I lost part of the original 
SpiderMonkey RegExp implementation in 1997 (jsregexp.c) due to a bug in 
SGI's EFS, and recovered by writing a Boyer-Moore search program in C 
using ed on my init 1 (single-user) booted system, essentially grepping 
the block device and saving pieces of the file.

But replay of atomic-and-idempotent operations, and arrant data 
corruption, are layering violation bugs. Bugs should not inform our 
filesystem abstraction's design if we can help it. Unless we are putting 
it on the consumers of the API to do forward error correction!

/be

Received on Sunday, 11 August 2013 23:06:18 UTC