Re: reading superblock

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

 



On Wed, Sep 17, 2008 at 12:57 AM, Rohit Sharma <imreckless@xxxxxxxxx> wrote:
> On Tue, Sep 16, 2008 at 9:47 AM, ashish mahamuni <ashitpro@xxxxxxxxxxx> wrote:
>> Hello Rohit,
>>
>> I hope you are doing this for getting hand on ext2/ext3 file systems.
>> So what I'll suggest is try to read the on disk data structures and read the Super Block. That will really help you to understand some part of file systems instead relying on some existing functions.
>
> Ya definitely Ashish,  have done my homework on this ;) .
>
> I was just searching , if there are any functions in ext2 to read the
> superblock.
>
>> I've posted one article regarding reading super block you can look at that...
>> http://bytes.com/forum/thread771405.html
>
> Manish also suggested me this method that you have implemented in your
> article, i have implemented this.
> I am looking for kernel space implementation .Can you help me on that.
> Manish has asked me to read the registered file systems and display
> the superblock from there. Any other method in kernel space??

A hacky way :-) ..... Modify any of the syscalls (write for eg.). From
the vfs inode get the superblock info. Check the magic number of
superblock. If it matches ext{2,3,4}, print the info.

Enjoy :-)

Thanks -
Manish

>>
>> Regards,
>> Ashish
>>
>>
>> --- On Mon, 15/9/08, Rohit Sharma <imreckless@xxxxxxxxx> wrote:
>>
>>> From: Rohit Sharma <imreckless@xxxxxxxxx>
>>> Subject: reading superblock
>>> To: "Kernelnewbies" <kernelnewbies@xxxxxxxxxxxx>
>>> Cc: "ext4" <linux-ext4@xxxxxxxxxxxxxxx>
>>> Date: Monday, 15 September, 2008, 10:11 PM
>>> I want to read ext2 superblock and display the structure.
>>>
>>> which function do i need to call for that.
>>> is it ext2_get_sb() or ext2_fill_super() or both ??
>>>
>>> this is the function prototype:
>>> static int ext2_fill_super(struct super_block *sb, void
>>> *data, int silent)
>>>
>>> what are the parameters data and silent used for.
>>>
>>> --
>>> To unsubscribe from this list: send an email with
>>> "unsubscribe kernelnewbies" to
>>> ecartis@xxxxxxxxxxxx
>>> Please read the FAQ at http://kernelnewbies.org/FAQ
>>
>>
>>      Get an email ID as yourname@xxxxxxxxx or yourname@xxxxxxxxxxxxxxx Click here http://in.promos.yahoo.com/address
>>
>>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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