Re: ext3 structure mapping to block device

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

 



On Mon, Aug 17, 2009 at 11:06 AM, ajit mote<mail2blackmen@xxxxxxxxx> wrote:
>
> Hello,
>
> I would like to know how file system structures are mapped to hard disk
> sector.

Each filesystem deals in the granularity of "block size" which is
generally configurable (typically 4K) during fs creation time. So each
block maps to 8 sectors (which are generally 512 bytes). Now given a
block number you can multiply it by 8 to get your hard disk sector.

> My goal is to understand how file system is created on block device
> and how superblocks are mapped to hard disk sectors.

Filesystem is created using a userspace binary (mke2fs for example in
case of ext2). Appropriate datastructures are written at appropiate
places during the FS creation time. See the sources of mkfs.c in
e2fsprogs.

Superblock will have a predefined block number where it resides. From
the above calculation you can know which sector to read.

>
> I am not sure whether I stated the problem precisely or not but if I did not
> described it properly then let me know.

I am not sure if that answers your question correctly  :-) . If not
please let me know.

Thanks -
Manish

>
> This is just an understanding sort of issue which I am looking for teaching
> purpose.
>
> Note:
>   Please free to change the subject line if not proper.
>
> --
> Thanks & Regards,
> Ajit Subhash Mote
>
>



-- 
Thanks -
Manish

--
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