Re: Super block info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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. 

Thanks,
VS

--- Jan Hudec <bulb@ucw.cz> wrote:
> On Mon, Sep 16, 2002 at 05:36:43AM +0100, Dharmender
> Rai wrote:
> > a super block is related to one file system. linux
> > supports many. "x" super-blocks can be used to
> support
> > that "x" fs types. the info about the fs can be
> > extracted using the union. 
> 
> More exactly, info the specific filesystem driver
> uses internaly is
> stored there. Noone but the driver system should
> ever look there.
> 
> > PS : union is being used to save space (also
> because
> > we need info abt 1 fs ) ;)
> > 
> >  --- VS <dojik@yahoo.com> wrote: > Hi,
> > > 
> > > In the struct super_block in linux/fs.h
> > > there is a union which has the union u which
> points
> > > to
> > > the super_block_info of different file systems.
> > > Could
> > > someone tell me what this super_block_info is
> and
> > > what
> > > it is used for. Is there any particular format
> for
> > > the
> > > structure. Is there any documentation on this on
> the
> > > web. Also I think to add a filesystem I have to
> use
> > > the generic_spb pointer in this union. Any
> pointers
> > > are appreciated.
> 
> It's data of filesystem driver. If you are writing a
> driver, put
> anything you need there. If not, don't ever thing of
> looking there.
> 
> If you are adding a driver, you may either patch
> fs.h to include your
> struct as well, or use the generic pointer.
> 
> > > Thanks,
> > > VS
> 
>
-------------------------------------------------------------------------------
> 						 Jan 'Bulb' Hudec <bulb@ucw.cz>


__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux