From: Jianchao Wang <jianchao.wan9@gmail.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Artem Blagodarenko <artem.blagodarenko@gmail.com>,
linux-ext4@vger.kernel.org, adilger.kernel@dilger.ca
Subject: Re: [HELP] What are the allocated blocks on a newly created ext4 fs ?
Date: Mon, 10 Jun 2019 11:54:35 +0800 [thread overview]
Message-ID: <683bc83a-a56d-1ecf-aa3d-5aa0aa3ac289@gmail.com> (raw)
In-Reply-To: <20190610033927.GA15963@mit.edu>
On 2019/6/10 11:39, Theodore Ts'o wrote:
> On Mon, Jun 10, 2019 at 11:25:47AM +0800, Jianchao Wang wrote:
>> Hi Artem
>>
>> Thanks so much for your help.
>>
>> On 2019/6/6 20:32, Artem Blagodarenko wrote:
>>> Hello Jianchao,
>>>
>>> Not enought input data to give an answer. It depends on mkfs options. For example, if flex_bg option is enabled, then several block groups are tied together as one logical block group; the bitmap spaces and the inode table space in the first block group, so some groups are not totally free just after FS creating.
>>
>> In my environment, there are 16 bgs per flex_bg.
>> The bitmaps and inode table .etc should lay on the first bg of every flex_bg.
>> So I can see there are about 8223 blocks allocated in the 1st bg of every flex_bg.
>>
>> But as you can see in the output of mb_groups, there are some bgs
>> which get allocated about 1024 blocks.
>>
>> I have out figured out what are they for.
>
> The best way to understand what the blocks are used for is to use the
> dumpe2fs program, e.g:
>
> % mke2fs -t ext4 -Fq /tmp/foo.img 1T
> % dumpe2fs /tmp/foo.img | more
> ...
> Group 0: (Blocks 0-32767) csum 0xe6f6 [ITABLE_ZEROED]
> Primary superblock at 0, Group descriptors at 1-128
> Reserved GDT blocks at 129-1152
> Block bitmap at 1153 (+1153), csum 0xb033995a
> Inode bitmap at 1169 (+1169), csum 0x108d3d73
> Inode table at 1185-1696 (+1185)
> 23385 free blocks, 8181 free inodes, 2 directories, 8181 unused inodes
> Free blocks: 9383-32767
> Free inodes: 12-8192
> Group 1: (Blocks 32768-65535) csum 0xe50b [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
> Backup superblock at 32768, Group descriptors at 32769-32896
> Reserved GDT blocks at 32897-33920
> Block bitmap at 1154 (bg #0 + 1154), csum 0x00000000
> Inode bitmap at 1170 (bg #0 + 1170), csum 0x00000000
> Inode table at 1697-2208 (bg #0 + 1697)
> 31615 free blocks, 8192 free inodes, 0 directories, 8192 unused inodes
> Free blocks: 33921-65535
> Free inodes: 8193-16384
> ...
>
Hi Ted
Many thanks for your help
These allocated blocks should be the reserved GDT blocks.
Many thanks again.
Jianchao
prev parent reply other threads:[~2019-06-10 3:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-06 10:41 [HELP] What are the allocated blocks on a newly created ext4 fs ? Jianchao Wang
2019-06-06 12:32 ` Artem Blagodarenko
2019-06-10 3:25 ` Jianchao Wang
2019-06-10 3:39 ` Theodore Ts'o
2019-06-10 3:54 ` Jianchao Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=683bc83a-a56d-1ecf-aa3d-5aa0aa3ac289@gmail.com \
--to=jianchao.wan9@gmail.com \
--cc=adilger.kernel@dilger.ca \
--cc=artem.blagodarenko@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).