OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 18, 2024 6:30 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 133 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9
Author Message
 Post subject: Re:Universal File System
PostPosted: Thu Jan 19, 2006 2:52 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
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:
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.

_________________
Image May the source be with you.


Top
 Profile  
 
 Post subject: Re:Universal File System
PostPosted: Wed Jan 25, 2006 7:20 am 
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.


Top
  
 
 Post subject: Re:Universal File System
PostPosted: Wed Jan 25, 2006 7:23 am 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 11:33 pm
Posts: 3882
Location: Eindhoven
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".


Top
 Profile  
 
 Post subject: Re:Universal File System
PostPosted: Wed Jan 25, 2006 7:28 am 
Forgot about that ;D Well we still need a different name. ;)


Top
  
 
 Post subject: Re:Universal File System
PostPosted: Wed Jan 25, 2006 8:03 am 
VSFS (Very Simple File System)? 8)


Top
  
 
 Post subject: Re:Universal File System
PostPosted: Sat Jan 28, 2006 3:00 am 
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:
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.


Top
  
 
 Post subject: Re:Universal File System
PostPosted: Sat Jan 28, 2006 10:23 pm 
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.


Top
  
 
 Post subject: Re:Universal File System
PostPosted: Sun Jan 29, 2006 6:10 pm 
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.


Top
  
 
 Post subject: Re:Universal File System
PostPosted: Mon Jan 30, 2006 10:58 pm 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
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

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
 Post subject: Re:Universal File System
PostPosted: Fri Mar 10, 2006 7:46 am 
Micro$oft are eejits, who would do such a thing???

Patent the FAT file system >:(


Top
  
 
 Post subject: Re:Universal File System
PostPosted: Sat Apr 01, 2006 6:18 pm 
What is the state of the file system?

can we try to implement it now or wait for a finished spec?


Top
  
 
 Post subject: Re: Universal File System
PostPosted: Sun Jun 03, 2007 5:15 am 
Offline
Member
Member

Joined: Sat Jun 02, 2007 10:35 am
Posts: 28
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 [s]are screwed[/s] 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.


Top
 Profile  
 
 Post subject: The actual patent
PostPosted: Thu Jun 07, 2007 11:32 pm 
Offline
Member
Member
User avatar

Joined: Wed Feb 07, 2007 1:45 pm
Posts: 1401
Location: Eugene, OR, US
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 133 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 39 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group