Page 9 of 9
Re:Universal File System
Posted: Thu Jan 19, 2006 2:52 am
by Pype.Clicker
Brendan wrote:
A more optimized implementation could try to use free space between files. For example, if the data area looks like:
[tt]
[00]: -----
[05]: 11111
[10]: 111--
[15]: --222
[20]: -----
[25]: -----[/tt]
oh, and btw, it all depends on how those "-" are encoded. say the former fig is actually represented by:
Code: Select all
index[0]={L1_FILE, sblk=5, eblk=16, size=7*BLKSZ+STUFF}
index[1]={L1_FILE, sblk=17,eblk=29, size=2*BLKSZ+STUFF}
then it becomes clear that room beyond file 2 (that is, blocks 20..29) is actually free for something else, since from the size of index[1] (which owns those blocks), they're unused.
To keep things clean, when such a "llama-with-screws" driver will detect room that needs to become "free", it just locates the previous file entry (not necessarily [i-1], thus), and extends the "eblk" value so that it now covers the "free" space (let's say that's how file 1 has "---" after it).
The "camel-with-stick" driver that wants to "shrink" a file just updates the "byte size" of the file, and both camels and llamas are kept happy.
Similarily, the "camel-with-stick" that wants to make the file deleted just tags it as "deleted". both llama or L2 driver will be happy and recover the space of the deleted file if they feel like.
Re:Universal File System
Posted: Wed Jan 25, 2006 7:20 am
by Slasher
Just wanted to let everyone know that there is a File system already called SFS. Think we should use UFS(Universal File System) like in the very first post of this topic.
Re:Universal File System
Posted: Wed Jan 25, 2006 7:23 am
by Candy
Code Slasher wrote:
Just wanted to let everyone know that there is a File system already called SFS. Think we should use UFS(Universal File System) like in the very first post of this topic.
You might just offend those that invented Unix, they kind of claimed UFS for "Unix File System".
Re:Universal File System
Posted: Wed Jan 25, 2006 7:28 am
by Slasher
Forgot about that ;D Well we still need a different name.
Re:Universal File System
Posted: Wed Jan 25, 2006 8:03 am
by Rob
VSFS (Very Simple File System)?
Re:Universal File System
Posted: Sat Jan 28, 2006 3:00 am
by dushara
Brendan wrote:
Hi,
dushara wrote:Would it be a good idea to keep 2 copies of the data area and index area size fields in your super block? (preferably over 2 sectors) and keep an incrementing counter.
Not really - if the counter itself can't be read then you won't know which set of values to use. We'd need 2 versions of this counter with an "extra something" to determine which version of the counter to use. Then we'd need to worry about what happens if there's a problem reading the "extra something".
This is a bit late and I hope it's still of some use.
The incremental counter I was talking about is part of the super block.
Something like this:
Code: Select all
struct {
unsigned int count;
/* superblock data */
unsigned short crc16;
}block[2];
Anytime the superblock is modified, block with the older count is used (with count updated).
Therefore if there was a power failure etc in the middle of writing the super block, we still have an older version.
Re:Universal File System
Posted: Sat Jan 28, 2006 10:23 pm
by bcat
Brendan, this looks like a nice, easy-to-implement file system. Just a quick question, though. Why does the draft spec say that the superblock has 64 bytes of space reserved for a partition table? I though the only boot sector with a partition table is the MBR, and the MBR has no file system, it just loads the active partition.
Re:Universal File System
Posted: Sun Jan 29, 2006 6:10 pm
by bcat
Also, why not require the index area to be a multiple of the block size? I think it would make coding a driver easier, since the index is always an integer number of sectors on the disk.
Re:Universal File System
Posted: Mon Jan 30, 2006 10:58 pm
by Brendan
Hi,
dushara wrote:Anytime the superblock is modified, block with the older count is used (with count updated).
Therefore if there was a power failure etc in the middle of writing the super block, we still have an older version.
Ah - sorry I misunderstood
Still, all file data can be recovered without using the super-block at all, so a second super-block doesn't seem too necessary.
bcat wrote:Brendan, this looks like a nice, easy-to-implement file system. Just a quick question, though. Why does the draft spec say that the superblock has 64 bytes of space reserved for a partition table? I though the only boot sector with a partition table is the MBR, and the MBR has no file system, it just loads the active partition.
Reserving space for a partition table doesn't cost anything (nothing lost) and allows for non-standard arrangements.
For example, on a hard disk partitions usually start and end on cylinder boundaries. This leaves the entire first cylinder wasted due to the MBR. Boot managers typically take advantage of this space for their own use - it would be possible for a boot manager to have an SFS file system hidden in that first cylinder where it won't be messed with by the OS.
It's also possible to have a hard disk without partitions (where then entire hard disk is like a huge floppy). In this case it'd be good to have a dummy partition table to tell other OSs that the entire disk is in use.
I agree that there isn't a
good reason for it, it's just that there's no reason not to.
bcat wrote:Also, why not require the index area to be a multiple of the block size? I think it would make coding a driver easier, since the index is always an integer number of sectors on the disk.
The idea here is that when a new index area entry is being created a very simple driver could add 64 to the index area size and then do "end_of_disk - new_index_area_size" to find where to store the next index area entry. In this case the very simple driver wouldn't need to check any existing index area entries to see if they are currently unused.
A better/more complex driver would check if there's any unused index area entry before creating a new one.
If the index area size was a multiple of the block size it'd make a very simple driver a little more complex and a complex driver a little simpler, but this isn't what I want to do (I'd rather make a very simple driver a little simpler, even if it does make a complex driver a little more complex).
Cheers,
Brendan
Re:Universal File System
Posted: Fri Mar 10, 2006 7:46 am
by KieranFoot
Micro$oft are eejits, who would do such a thing???
Patent the FAT file system >:(
Re:Universal File System
Posted: Sat Apr 01, 2006 6:18 pm
by Slasher
What is the state of the file system?
can we try to implement it now or wait for a finished spec?
Re: Universal File System
Posted: Sun Jun 03, 2007 5:15 am
by axilmar
Brendan wrote:Hi,
Now that
Microsoft have patented the FAT file system, there is no simple file system that can be used for transferring data easily between computers, and OS developers who are using FAT
are screwed may be sued if Microsoft get bored.
Isn't the ISO 9660 FS (the one used in CDs/DVDs) suitable for such a task? I apologize if it has already been suggested, but I did not have the time to read all the messages.
The actual patent
Posted: Thu Jun 07, 2007 11:32 pm
by bewing
I'm a part-time inventor, so I'm familiar with the whole patent dealio -- and I wanted to see precisely what was meant by "Now that Microsoft has patented the FAT file system".
I know full well that FAT12 and FAT16 are well past any possible patent expirations. It turns out that the patent in question, #5,579,517 -- is actually about the specific way that long filenames are implemented in the DOS6/Windows directory structure. It's not technically about the file allocation structure at all.
So, just so long as you have some completely different way of storing your LFN's, you are safe from this patent. And the patent expires in a little under 6 and a half years.
Of course, if you are trying to implement full LFN compatibility -- so that you can read or write LFNs on a Windows formatted disk -- then the patent certainly is aimed at preventing you from doing such a thing.