From: Ted Ts'o <tytso@mit.edu>
To: "Nelson, John R" <John_Nelson@student.uml.edu>
Cc: Andreas Dilger <adilger@dilger.ca>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: Extent Depth Histogram Fsck
Date: Tue, 26 Jun 2012 16:00:26 -0400 [thread overview]
Message-ID: <20120626200026.GA28831@thunk.org> (raw)
In-Reply-To: <0408C81F72528E40A0D3235A1F67FFC804A3B3@SN2PRD0202MB144.namprd02.prod.outlook.com>
On Tue, Jun 26, 2012 at 06:07:10PM +0000, Nelson, John R wrote:
> ok i see!
> So when there are like
> 3/3/4 that means double index blocks?? How many extents can a single extent index hold in a block?
You can put 4 entries in the inode, and then there can be 340 entries
in each 4k extent tree block. Each entry can either be a leaf entry
or an index entry (i.e., pointing to another extent tree block).
So it's pretty rare for there extent tree to have a depth greater than
1. In order to actually test the code, what I do is use a 1k block
size (so you can only fit 84 entries in each ETB), and then use a
small file system, and then do something like this:
touch /tmp/test.img
mke2fs -t ext4 -O ^has_journal -F -b 1024 -N 131084 /tmp/test.img 150M
mount -o loop /tmp/test.img /mnt
cd /mnt
seq 1 131072 | xargs -n 1 fallocate -l 1024
seq 1 2 131072 | xargs rm
fallocate -l 64M test-file
cd ..
umount /mnt
i.e., create a maximally fragmented file system, and then create a
large file. But this is very rare in real-life workloads.
- Ted
next prev parent reply other threads:[~2012-06-26 20:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-26 14:34 Extent Depth Histogram Fsck Nelson, John R
2012-06-26 15:40 ` Andreas Dilger
2012-06-26 18:07 ` Nelson, John R
2012-06-26 20:00 ` Ted Ts'o [this message]
2012-06-26 20:07 ` Andreas Dilger
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=20120626200026.GA28831@thunk.org \
--to=tytso@mit.edu \
--cc=John_Nelson@student.uml.edu \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
/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).