Re: [PATCH RFC] ext4: collapse a single extent tree block into the inode if possible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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"

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux