[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
changes to vfs
Ethan,
I am making the following changes to the code and I wanted to check w/ you.
1) adding the following two fields to the __fsdriver struct.
void *file_ptr <- this is where you would store your EXT2_FILE
void *filefs_ptr <- for saving EXT2_FS
I think this is logically the correct place to put it because these are
internal to a fs driver
2) I am going to implement the following struct
{
char *device /* device node */
char *partition /* device partition? */
char *alias /* alias for the above device node - eg: hd:3 */
__fsdriver *driver /* stores correct fs driver for this
particular partition */
int fs /* ? Maybe the magic number */
}
I was thinking that we could use this struct to store the correct fs driver
for a particular device node (and partition) after we call fs->verify().
Store an array of these things and then use them later. do you think this
type of setup would be good for getcwd() and chdir()? I will try and check
the kernel code to see how the kernel implements this to get an idea how to
proceed. unfortunately, this the first time that I am looking at the code,
so it is taking me a while. Do you have any ideas on implementing these two
things? I think we have to keep track of where we are in the FS
constantly, because the first step is getting _to_ someplace is know _where_
we are. again, my guess is that the kernel does something similar but I
don't know where...
3) I still have 2 unresolved variables in ext2.c - DEVICENODE and FILENAME.
I know the names are quite obvious, but I wanted to confirm that these are
in fact the same DEVICENODE and FILENAME that the client asks to open() or
read() or write() correct? the reason that you had to make them place
holders was because there is no implementation for those functions yet.
4) Other than the kernel, is there any other place where I can look for how
to implement a verify for FS? (I am thinking other than the ext2 FS). I
have read some stuff about ext2 FS but not having done this before, I don't
even know where to start. is it as simple as just reading block 0? if so
can I do it on a normally functioning unix system ( I don't think the OS
will let me access it)?
please let me know what you think.
ajay