On Mon, Sep 16, 2002 at 04:11:58AM -0700, VS wrote: > > Hi, > > Thanks for the replies. > But I should have been more clear when phrasing the > question. In every filesystem implmentation there are > two structrues the super_block structure and the > super_block_info structure. The super_block_info > structure will be in the union in the vfs_super_block > and the super_block_info has the pointer to the actual > super_block of the filesystem. For example in the > vfs_super_block structure there is the msdos_sb_info. > And the msdos_sb_info has a pointer to the > fat_boot_sector structure. I noticed that the > variables in the super_block_info are not uniform > across filesystem implementations. From your replies I > see that the super_block_info is implementation > dependent and so it is the driver's implementor that > decides which info he needs. Am I right? I am trying > to implement a filesytem for the sake of learning and > so am looking into all this. Variables in super_block_info are uniform across many filesystems simply because they have very similar needs. Just have a look at nfs_superblock_info and you will see. As that one has no pointer to "actual" superblock as there is none and it is huge, because it keeps info about the server and volume. Generaly it depends on what is your filesystem like. If it's a block device filesystem, you will need similar info to ext2 or msdos there (and it will include pointer to superblock data read from the device). If it's going to be network filesystem, you probably need to put info about the connection to server there (but you may end up storing it somewhere else and not using super_block_info at all (FS_SINGLE case)). And if it's some special filesystem (something along the lines procfs, devfs, ... some drivers have their own stuff similar to proc), then you may need something yet different. ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bulb@ucw.cz> -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/