Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   EXT3 Users (http://www.linux-archive.org/ext3-users/)
-   -   Allocation of Indirect Blocks (http://www.linux-archive.org/ext3-users/518426-allocation-indirect-blocks.html)

Sean McCauliff 04-25-2011 10:07 PM

Allocation of Indirect Blocks
 
Does ext3 allocate indirect blocks as needed or is there some fixed
number of these like inodes? Should I be concerned with running out of
indirect blocks?


Thanks,
Sean

_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users

Eric Sandeen 04-25-2011 10:13 PM

Allocation of Indirect Blocks
 
On 4/25/11 5:07 PM, Sean McCauliff wrote:
> Does ext3 allocate indirect blocks as needed or is there some fixed number of these like inodes? Should I be concerned with running out of indirect blocks?

ext3 allocates them as needed.

In fact you will often see them allocated consecutively with the data blocks they refer to:

debugfs: stat bigfile
Inode: 12 Type: regular Mode: 0644 Flags: 0x0
Generation: 330185944 Version: 0x00000000
User: 0 Group: 0 Size: 8388608
File ACL: 0 Directory ACL: 0
Links: 1 Blockcount: 16450
Fragment: Address: 0 Number: 0 Size: 0
ctime: 0x4db5f1c8 -- Mon Apr 25 17:12:24 2011
atime: 0x4db5f1c8 -- Mon Apr 25 17:12:24 2011
mtime: 0x4db5f1c8 -- Mon Apr 25 17:12:24 2011
BLOCKS:
(0-11):2561-2572, (IND):2573, (12-267):2574-2829, (DIND):2830, (IND):2831, (268-
523):2832-3087, (IND):3088, (524-779):3089-3344, (IND):3345, (780-1035):3346-360
1, (IND):3602, (1036-1291):3603-3858, (IND):3859, (1292-1547):3860-4115, (IND):4
116, (1548-1803):4117-4372, (IND):4373, (1804-2059):4374-4629, (IND):4630, ...

... and so on (IND/DIND are indirect & double indirect blocks).

-Eric

> Thanks,
> Sean

_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users

Sean McCauliff 04-25-2011 10:15 PM

Allocation of Indirect Blocks
 
Cool.

Thanks,
Sean

Eric Sandeen wrote:

On 4/25/11 5:07 PM, Sean McCauliff wrote:


Does ext3 allocate indirect blocks as needed or is there some fixed number of these like inodes? Should I be concerned with running out of indirect blocks?



ext3 allocates them as needed.

In fact you will often see them allocated consecutively with the data blocks they refer to:

debugfs: stat bigfile
Inode: 12 Type: regular Mode: 0644 Flags: 0x0
Generation: 330185944 Version: 0x00000000
User: 0 Group: 0 Size: 8388608
File ACL: 0 Directory ACL: 0
Links: 1 Blockcount: 16450
Fragment: Address: 0 Number: 0 Size: 0
ctime: 0x4db5f1c8 -- Mon Apr 25 17:12:24 2011
atime: 0x4db5f1c8 -- Mon Apr 25 17:12:24 2011
mtime: 0x4db5f1c8 -- Mon Apr 25 17:12:24 2011
BLOCKS:
(0-11):2561-2572, (IND):2573, (12-267):2574-2829, (DIND):2830, (IND):2831, (268-
523):2832-3087, (IND):3088, (524-779):3089-3344, (IND):3345, (780-1035):3346-360
1, (IND):3602, (1036-1291):3603-3858, (IND):3859, (1292-1547):3860-4115, (IND):4
116, (1548-1803):4117-4372, (IND):4373, (1804-2059):4374-4629, (IND):4630, ...

... and so on (IND/DIND are indirect & double indirect blocks).

-Eric



Thanks,
Sean






_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users

Carlos Maiolino 06-13-2011 03:52 PM

Allocation of Indirect Blocks
 
Hi Sean,

> Eric Sandeen wrote:
> >On 4/25/11 5:07 PM, Sean McCauliff wrote:
> >>Does ext3 allocate indirect blocks as needed or is there some fixed number of these like inodes? Should I be concerned with running out of indirect blocks?
> >ext3 allocates them as needed.
> >
> >In fact you will often see them allocated consecutively with the data blocks they refer to:
> >

Not sure if it's an useful comment, but even that ext2/3 uses indirect blocks as needed and you need not care about it while writing to the FS, you'll still need to be careful about the maximum file size, which can be up to 2TiB using default 4k blocks iirc.

Cheers

--
-Carlos

_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users


All times are GMT. The time now is 10:19 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.