Filesytem, cool thing I just realized about mine.
Filesytem, cool thing I just realized about mine.
Anyway, I just thought I'd let everybody know. The RWFS filesystem that I've been working on, apparently can handle 536862719.75000381 exabytes of disk space at on one partition! Simply by using the computers ability to calculate, instead of listing. Anyway, it's not done yet but I thought it was pretty cool.
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Re: Filesytem, cool thing I just realized about mine.
First of all, instead of trying to manage the whole hard disk as just a series of blocks. I decided to split it into even larger divisions called block sections. These sections have no characteristics other than number, and files can stretch across any number of block sections. They are really only used to calculate logical addresses. I'm kinda stuck for time right now so more later...
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Re: Filesytem, cool thing I just realized about mine.
Also, it uses 32 bit multiplication to represent id's and blocks and such. So It's main limitation is what the operating system is willing to calculate 64 bit 128 bit etc.
EDIT:
This should give you an idea of how it works. The filesytem is designed so that information is really only given as needed to find the files.
EDIT 2:
I think I've gotten into the habit of extreme commenting....
EDIT:
Code: Select all
/*Copyright (C) Kristian Hart 2009
typedef struct
{
unsigned short version_id; //allow for reading different versions of the filesystem
unsigned short system_id;//id that an operating system can use to know what os the filesystem originated on
unsigned short m_ownerid;//the id of the person who is admin of the filesystem
unsigned short sector_size;// size of a sector in bytes
unsigned short blocksize;//the size of a block in the fs in number of sectors
unsigned int blocksections;//number of block sections
unsigned int num_file_entry_blocks;
}FS_DESCRIPTOR;//structure that defines a filesystems characteristics
typedef struct
{
unsigned int idbase;//directory id base
unsigned int idcalc;// a number to multiply the idbase by to get the actual id(usually 1 on small trees)
unsigned int parent_idbase;
unsigned int parent_idcalc;
char name[20];
}DS_DENTRY;//defines an entry in the directory tree
typedef struct
{
unsigned int blocksection;
unsigned int blockstart;// start block
unsigned int blocks;//consecutive blocks in the array entry
}BLOCK_ARRAY_ENTRY;//enty in a list of blocks
typedef struct
{
unsigned char system;//bits the system uses for characteristics
char name[20];
unsigned int parent_idbase;//id base of the parent folder
unsigned int parent_idcalc;//id calc of the parent folder
unsigned int num_barray_blks;// number of block entry array blocks (they are always consecutive)
unsigned int blocksection;//the blocksection the array is in
unsigned int blockstart;//first block in the array
}FD_ENTRY;//file descriptor entry
EDIT 2:
I think I've gotten into the habit of extreme commenting....
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Re: Filesytem, cool thing I just realized about mine.
happens to all of us at some point
btw where can i find some tutorial for a barebone filesystem that i can build on?
btw where can i find some tutorial for a barebone filesystem that i can build on?
One Tequila, Two Tequila, Three Tequila, Floor!
Re: Filesytem, cool thing I just realized about mine.
I've almost got a disk image program for it working.
I wonder, has anyone used this technique to allow this much storage so far?
I wonder, has anyone used this technique to allow this much storage so far?
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Filesytem, cool thing I just realized about mine.
I might like to implement it for floppy storage in TBOS now that I've read over some existing FAT12 code.
Re: Filesytem, cool thing I just realized about mine.
Wondering, would an article about this particular filesystem be wanted for the wiki? At least, once I get my kernel to boot from it.
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Re: Filesytem, cool thing I just realized about mine.
Using it in my OS!
Current work on a OS: SauOS (project homepage: http://code.google.com/p/sauos/)
Re: Filesytem, cool thing I just realized about mine.
Use it as you like, I only ask that you make mention of me in your OS design or code.
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Re: Filesytem, cool thing I just realized about mine.
Not to advertise my os (as it is only just starting), but the design for the fs (the layout that is) is at http://code.google.com/p/leviathanv/ in the wiki.
EDIT: It's not complete but it will give you an idea of how the fs is a arranged.
EDIT: It's not complete but it will give you an idea of how the fs is a arranged.
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Re: Filesytem, cool thing I just realized about mine.
Actually I'm rethinking that. Wondering, around what percent of sectors are usually bad?
EDIT: If it's a relatively small amount, I can just list bad sectors in a table.
EDIT: If it's a relatively small amount, I can just list bad sectors in a table.
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: Filesytem, cool thing I just realized about mine.
Wikipedia agrees:
[quote=Wikipedia]A modern hard drive comes with many spare sectors. When a sector is found to be bad by the firmware of a disk controller, the disk controller remaps the logical sector to a different physical sector.[/quote]
So I wouldn't worry about bad sectors. You'll probably end up blacklisting sectors that the firmware later remaps and repairs.
[quote=Wikipedia]A modern hard drive comes with many spare sectors. When a sector is found to be bad by the firmware of a disk controller, the disk controller remaps the logical sector to a different physical sector.[/quote]
So I wouldn't worry about bad sectors. You'll probably end up blacklisting sectors that the firmware later remaps and repairs.
Re: Filesytem, cool thing I just realized about mine.
Ah, the reason I was worrying about bad sectors was that Tanenbaum's book says that not all hard disks do that. So I'm cutting that section out of the filesystem.
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Re: Filesytem, cool thing I just realized about mine.
I have now the fully revised version 1 of the RWFS filesystem. Check the wiki at http://code.google.com/p/leviathanv/wiki/RWFS for the updated structures(Really only one small addition to the FS_DESCRIPTOR structure). I added an entry for allocating free blocks.
EDIT: Once, I have the filesystem implemented in an image program and have my kernel booting, I'll try to add a complete article on implementing it in the OSDEV wiki.
EDIT: Once, I have the filesystem implemented in an image program and have my kernel booting, I'll try to add a complete article on implementing it in the OSDEV wiki.
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Filesytem, cool thing I just realized about mine.
Please do, and if possible, make the source for the image program available so we can compile it and simplify making images with the FS onboardnekros wrote:Once, I have the filesystem implemented in an image program and have my kernel booting, I'll try to add a complete article on implementing it in the OSDEV wiki.