From: Theodore Ts'o <tytso@mit.edu>
To: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH RFC] ext4: collapse a single extent tree block into the inode if possible
Date: Thu, 9 Aug 2012 09:07:54 -0400 [thread overview]
Message-ID: <20120809130754.GB4511@thunk.org> (raw)
In-Reply-To: <1344516283-4430-1-git-send-email-tytso@mit.edu>
Here's a test script which demonstrates how we can up with an external
extent tree block containing a single extent. It needs to run as root
since it will be mounting a test file system image on /mnt.
#!/bin/bash
fs=/u1/test-fs.img
num=128
max=$(expr $num \* 8)
size=$(expr $num \* 32)k
dd if=/dev/zero of=$fs bs=4k count=$(expr $max \* 4)
mke2fs -t ext4 -b 4096 -qF $fs
mount -t ext4 $fs /mnt
cd /mnt
fallocate -l $size test-file
for i in $(seq 0 8 $max | sed -e '$d') ; do
dd if=/dev/zero of=test-file conv=notrunc,nocreat bs=4k \
seek=$i count=1 > /dev/null 2>&1
done
sync
dd if=/dev/zero of=test-file conv=notrunc,nocreat \
bs=4k count=$max > /dev/null 2>&1
sync
cd /
umount /mnt
debugfs $fs -R "stat test-file"
prev parent reply other threads:[~2012-08-09 13:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-09 12:44 [PATCH RFC] ext4: collapse a single extent tree block into the inode if possible Theodore Ts'o
2012-08-09 12:56 ` Theodore Ts'o
2012-08-09 13:07 ` Theodore Ts'o [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=20120809130754.GB4511@thunk.org \
--to=tytso@mit.edu \
--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).