ZFS and other filesystem semantics.

Christopher Arnold chris at arnold.se
Tue Dec 9 06:27:44 PST 2008


Hi,

i have been thinking a bit about filesytem semantics lately. Mainly about 
open files.

Classicly if a file is open the filedescriptor continues accessing the 
same file regardless if it is deleted or someone did a mv and replaced it.

But what happens in ZFS?

* delete file in ZFS
I guess this is a no brainer, standard unix way of accessing the old file.

* The fs get snapshotted and file deleted
Same as above i guess.

* The fs gets snapshotted and later the snapshot get deleted...
What happens here?

Or maybe even:
* The fs gets snapshotted, file deleted, then snapshot deleted.

(These questions are actually just a sidestep from the issue im trying to 
figure out right no. But i guess they are nevertheless interesting.)

The reason i have been thinking about this is that i'm implementing a 
remote RO filesystem with local caching. And to reduce latency i download 
chunks of the files and cache these chunks. I'm trying to keep the 
filesystem stateless, but my issue is that if the file get changed under 
our feet the resulting chunks would be from different files.

Have anyone seen a nice solution to this issue?

Does anyone have any ideas of how to implement unix like semantics over a 
stateless procotol without to much magic?


 	/Chris

--
http://www.arnold.se/chris/


More information about the freebsd-fs mailing list