* [HELP] What are the allocated blocks on a newly created ext4 fs ?
@ 2019-06-06 10:41 Jianchao Wang
2019-06-06 12:32 ` Artem Blagodarenko
0 siblings, 1 reply; 5+ messages in thread
From: Jianchao Wang @ 2019-06-06 10:41 UTC (permalink / raw)
To: linux-ext4; +Cc: tytso, adilger.kernel
Dear all
After I newly created a ext4 fs and check the mb_group,
#group: free frags first [ 2^0 2^1 2^2 2^3 2^4 2^5 2^6 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]
#0 : 23513 1 9255 [ 1 0 0 1 1 0 1 1 1 1 0 1 1 2 ]
#1 : 31743 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 1 1 3 ]
^^^^
#2 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ]
#3 : 31743 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 1 1 3 ]
#4 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ]
#5 : 31743 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 1 1 3 ]
#6 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ]
#7 : 31743 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 1 1 3 ]
#8 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ]
#9 : 31743 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 1 1 3 ]
#10 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ]
#11 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ]
There are some bgs that have 1024 blocks allocated. What are they for ?
Many thanks in advance
Jianchao
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [HELP] What are the allocated blocks on a newly created ext4 fs ? 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 0 siblings, 1 reply; 5+ messages in thread From: Artem Blagodarenko @ 2019-06-06 12:32 UTC (permalink / raw) To: Jianchao Wang; +Cc: linux-ext4, tytso, adilger.kernel 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. > On 6 Jun 2019, at 13:41, Jianchao Wang <jianchao.wan9@gmail.com> wrote: > > Dear all > > After I newly created a ext4 fs and check the mb_group, > > #group: free frags first [ 2^0 2^1 2^2 2^3 2^4 2^5 2^6 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ] > #0 : 23513 1 9255 [ 1 0 0 1 1 0 1 1 1 1 0 1 1 2 ] > #1 : 31743 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 1 1 3 ] > ^^^^ > #2 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ] > #3 : 31743 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 1 1 3 ] > #4 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ] > #5 : 31743 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 1 1 3 ] > #6 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ] > #7 : 31743 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 1 1 3 ] > #8 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ] > #9 : 31743 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 1 1 3 ] > #10 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ] > #11 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ] > > There are some bgs that have 1024 blocks allocated. What are they for ? > BTW, I don’t see from mb_group output why 1024 blocks allocated in group #1 > Many thanks in advance > Jianchao Best regards, Artem Blagodarenko. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [HELP] What are the allocated blocks on a newly created ext4 fs ? 2019-06-06 12:32 ` Artem Blagodarenko @ 2019-06-10 3:25 ` Jianchao Wang 2019-06-10 3:39 ` Theodore Ts'o 0 siblings, 1 reply; 5+ messages in thread From: Jianchao Wang @ 2019-06-10 3:25 UTC (permalink / raw) To: Artem Blagodarenko; +Cc: linux-ext4, tytso, adilger.kernel 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. Thanks Jianchao > >> On 6 Jun 2019, at 13:41, Jianchao Wang <jianchao.wan9@gmail.com> wrote: >> >> Dear all >> >> After I newly created a ext4 fs and check the mb_group, >> >> #group: free frags first [ 2^0 2^1 2^2 2^3 2^4 2^5 2^6 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ] >> #0 : 23513 1 9255 [ 1 0 0 1 1 0 1 1 1 1 0 1 1 2 ] >> #1 : 31743 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 1 1 3 ] >> ^^^^ >> #2 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ] >> #3 : 31743 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 1 1 3 ] >> #4 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ] >> #5 : 31743 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 1 1 3 ] >> #6 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ] >> #7 : 31743 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 1 1 3 ] >> #8 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ] >> #9 : 31743 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 1 1 3 ] >> #10 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ] >> #11 : 32768 1 0 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 4 ] >> >> There are some bgs that have 1024 blocks allocated. What are they for ? >> > BTW, I don’t see from mb_group output why 1024 blocks allocated in group #1 >> Many thanks in advance >> Jianchao > > Best regards, > Artem Blagodarenko. > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [HELP] What are the allocated blocks on a newly created ext4 fs ? 2019-06-10 3:25 ` Jianchao Wang @ 2019-06-10 3:39 ` Theodore Ts'o 2019-06-10 3:54 ` Jianchao Wang 0 siblings, 1 reply; 5+ messages in thread From: Theodore Ts'o @ 2019-06-10 3:39 UTC (permalink / raw) To: Jianchao Wang; +Cc: Artem Blagodarenko, linux-ext4, adilger.kernel 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 ... Regards, - Ted ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [HELP] What are the allocated blocks on a newly created ext4 fs ? 2019-06-10 3:39 ` Theodore Ts'o @ 2019-06-10 3:54 ` Jianchao Wang 0 siblings, 0 replies; 5+ messages in thread From: Jianchao Wang @ 2019-06-10 3:54 UTC (permalink / raw) To: Theodore Ts'o; +Cc: Artem Blagodarenko, linux-ext4, adilger.kernel 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-06-10 3:54 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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).