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

Re: Reading output from "debugfs -R stat <8>"



On Tue, Nov 27, 2001 at 06:39:43PM -0800, Andrew Morton wrote:
> Mike Fedyk wrote:
> > 
> > (0-11):506-517, (IND):518, (12-1035):519-1542, (DIND):1543, (IND):1544, 
(1036-2059):1545-2568, (IND):2569, (2060-3083):2570-3593, (IND):3594, 
(3084-4107):3595-4618, (IND):4619, (4108-5131):4620-5643, (IND):5644, 
(5132-6155):5645-6668, (IND):6669, (6156-7179):6670-7693, (IND):7694, 
(7180-8203):7695-8718, (IND):8719, (8204-9227):8720-9743, (IND):9744, 
(9228-10251):9745-10768, (IND):10769, (10252-11275):10770-11793, (IND):11794, 
(11276-12299):11795-12818, (IND):12819, (12300-13323):12820-13843, (IND):13844, 
(13324-14347):13845-14868, (IND):14869, (14348-15371):14870-15893, (IND):15894, 
(15372-16395):15895-16918, (IND):16919, (16396-17419):16920-17943, (IND):17944, 
(17420-18443):17945-18968, (IND):18969, (18444-19467):18970-19993, (IND):19994, 
(19468-20491):19995-21018, (IND):21019, (20492-21515):21020-22043, (IND):22044, 
(21516-22539):22045-23068, (IND):23069, (22540-23563):23070-24093, (IND):24094, 
(23564-24587):24095-25118, (IND):25119, (24588-25600):25120-26132
> > TOTAL: 25627
> 
> Yup.  That's a perfect unfragmented file.
>

OK, great!

> > 
> > I understand the concept of inderect blocks, and double inderect blocks, but
> > I don't understand the output given by this command.  Some of the numbers in
> > () overlap numbers that are not in ().  Can someone explain, or point me to
> > a manual that I can read?
> 
> The numbers in parentheses are the logical block numbers - the
> offset into the file. The unparenthesised numbers are physical block
> numbers, relative to the start of the disk partition.  So the table
> is showing the logical->physical mapping for a single file.
>

Am I correct in thinking that (IND):12819 is a indirect block at 12819?

If so, from reading 2.4.14/Documentation/filesystems:
There are pointers to the first 12 blocks which contain the file's data
in the inode.  There is a pointer to an indirect block (which contains
pointers to the next set of blocks), a pointer to a doubly-indirect
block (which contains pointers to indirect blocks) and a pointer to a
trebly-indirect block (which contains pointers to doubly-indirect blocks)

...This makes me think that there should be only three indirect blocks, 1)
for blocks over 12 [direct blocks] 2) indirect blocks 3) doubly indirect
blocks.

Why are there so many indirect blocks?

> > The rest of the groups average out to:
> >  Group  1: block bitmap at 32770, inode bitmap at 32771, inode table at 
32772
> >            32267 free blocks, 15904 free inodes, 0 used directories
> 
> A block group is that number of blocks which can be managed
> with a block's worth of bits in the bitmap.  I think.
> 
> So with 4k blocksize, the bitmap block has 32k bits.  So the
> block group has 32k blocks.  That's 128 megabytes.
> 
> So your disk is approx 30 * 128 megabytes, I trust.  The 30 block
> groups are spread evenly and linearly across the partition.
> 

Yep, about just under 4GB.

MF





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