Hi,<br><br>I'm reading the source code for ext2/ext3/ext4, and cannot figure<br>out how descriptor_loc() runs:<br><br>1600static ext3_fsblk_t descriptor_loc(struct super_block *sb,<br>1601 ext3_fsblk_t logic_sb_block,<br>
1602 int nr)<br>1603{<br>1604 struct ext3_sb_info *sbi = EXT3_SB(sb);<br>1605 unsigned long bg, first_meta_bg;<br>1606 int has_super = 0;<br>1607<br>1608 first_meta_bg = le32_to_cpu(sbi->s_es->s_first_meta_bg); <br>
<br><br>1) Who can setup the field ->s_first_meta_bg, mke2fs? And what does it mean?<br> What's a meta block group? <br><br>1609<br>1610 if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_META_BG) ||<br>
1611 nr < first_meta_bg)<br><br>2) In which case, we can have "nr < first_meta_bg"?<br> And how does EXT3_FEATURE_INCOMPAT_META_BG affect the physical disk layout?<br><br><br>1612 return (logic_sb_block + nr + 1);<br>
1613 bg = sbi->s_desc_per_block * nr;<br>1614 if (ext3_bg_has_super(sb, bg))<br>1615 has_super = 1;<br>1616 return (has_super + ext3_group_first_block_no(sb, bg));<br><br>3) It always return the first block no of the specific bg, right?<br>
Then its caller ext3_fill_super will read in the disk block.<br> It seems that ext3_fill_super just read many copies of one same block<br> (1st block), right?<br><br> I'm sure I'm wrong with it, but cannot find out the right way.<br>
<br>1617}<br><br><br>Any explanation are welcome.<br><br>thanks, <br>