Welcome, Guest. Please login or register.

Author Topic: PFS/SFS  (Read 3053 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: PFS/SFS
« on: July 26, 2007, 09:17:33 PM »
Quote
it doesn't write the file to disk until the whole file is ready to go, or something, so that if you get a power cut, you don't lose the original file

It's called soft updates, which is based on concept of atomic commit.

Basically it does write to disk right away, but it does it in a way that the filesystem logical structure cannot get corrupted even if power is lost. The final single write replaces the previous "snapshot" of the state of the filesystem with a new one. If power is lost before the final write can be made, the filesystem automagically rolls back to previous state.

Simple (and simplified) way to visualise this is think about filesystem metadata as a tree: Trunk is the root directory. Branches are the subdirectories, leaves are the files. When changes occur to this tree, PFS3 updates clone of the tree structure in memory. When PFS3 does the "commit" it writes the file structure to disk in reverse order (from top down) [actually it only writes the changed parts, but it uses free blocks, it doesn't modify the original tree at all]. The final write "plants" the new tree, replacing the old one. If the write was successful, the storage held by the now obsoleted old tree parts are released for future use.

This is different from filesystem journaling SFS has.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: PFS/SFS
« Reply #1 on: July 27, 2007, 03:30:13 PM »
Quote
I haven't made good enough tests, but for "real life use" SFS feels faster IMHO.

SFS is slower in real life use I have to say. SFS can get unbearably slow quite easily, say for example two applications writing to large files at the same time (they get blocks allocated in 1-2-1-2-1-2 fashion, resulting in massive worst-case-scenario fragmentation). That's quite stupid oversight from supposedly "smart" filesystem.

Last time I tested SFS it commited suicide after copying 20GB of data. Though I do admit that this is no indication of anything... ;-)
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: PFS/SFS
« Reply #2 on: July 27, 2007, 06:13:00 PM »
@ChrisH

I've never seen this long file name problem, and I do have tons of files with long names. In fact, this is the very first time I've ever heard of such problem.

Out of interest, how can I reproduce it?
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: PFS/SFS
« Reply #3 on: July 29, 2007, 06:12:05 PM »
@ChrisH
Quote
The easiest way to cause the problem was to get AmiNetRadio to make some recordings to disk, which creates MP3s typically with ridiculously long filenames (depending on radio station). Unless I did it to RAM disk there would frequently be problems.

I frequently do this, and I've never had a single problem.