views:

35

answers:

1

Hello,

I was playing with Linux's new FS, BTRFS and was doing some research about it. BTRFS like Ext4 implements extents as allocation unit for data and metadata. So my understanding is (correct me if I'm worng) that extent is a variable space size of contignuos blocks. My question is...is one file stored on one extent or multiple...or do they have groups of different extent sizes? I'm not really sure how do they map to blocks...

Thanks!

A: 

Yes, an extent is a contiguous group of blocks. The allocation size (4KB etc.) determines just how large a single extent can be. So two things can cause a file to have multiple extents: 1) The file is larger than the largest contiguous free space and 2) The file is larger than the largest possible extent size supported by the allocation size.

Amardeep
Thanks, but I'm still confused on how they map a file to blocks. They are the objects addressed by Inodes and they only group fix or variable number of blocks?
dakt