From: "Theodore Ts'o" <tytso@mit.edu>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Matthew Wilcox <willy@infradead.org>,
linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Parisc List <linux-parisc@vger.kernel.org>
Subject: Re: Question about ext4 testing: need to produce a high depth extent tree to verify mapping code
Date: Sat, 6 Jul 2019 00:02:21 -0400 [thread overview]
Message-ID: <20190706040221.GC11665@mit.edu> (raw)
In-Reply-To: <1562352542.2953.10.camel@HansenPartnership.com>
On Fri, Jul 05, 2019 at 11:49:02AM -0700, James Bottomley wrote:
> > Create a series of 4kB files numbered sequentially, each 4kB in size
> > until you fill the partition. Delete the even numbered ones. Create
> > a 20MB file.
>
> Well, I know *how* to do it ... I was just hoping, in the interests of
> creative laziness, that someone else had produced a script for this
> before I had to ... particularly one which leaves more randomized gaps.
You mean something like this? It doesn't do randomized gaps, since
usually I'm trying to stress test block allocations.
#!/bin/bash
DEV=/dev/lambda/scratch
SIZE=10M
mke2fs -Fq -t ext4 -i 4096 -b 4096 $DEV $SIZE
max=$(dumpe2fs -h $DEV 2>/dev/null | awk -F: '/^Free blocks:/{print $2}')
mount $DEV /mnt
cd /mnt
mkdir -p d{0,1,2,3,4,5,6,7,8,9}/{0,1,2,3,4,5,6,7,8,9}
seq 1 $max | sed -E -e 's;^([[:digit:]])([[:digit:]])([[:digit:]]);d\1/\2/\3;' > /tmp/files$$
cat /tmp/files$$ | xargs -n 1 fallocate -l 4096 2>/dev/null
sed -ne 'p;n' < /tmp/files$$ | xargs rm -f
cd /
umount $DEV
rm /tmp/files$$
prev parent reply other threads:[~2019-07-06 4:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-01 22:44 [BUG] mke2fs produces corrupt filesystem if badblock list contains a block under 251 James Bottomley
2019-07-02 0:23 ` Theodore Ts'o
2019-07-02 0:53 ` James Bottomley
2019-07-02 17:33 ` Theodore Ts'o
2019-07-02 19:31 ` James Bottomley
2019-07-02 20:39 ` Theodore Ts'o
2019-07-03 0:37 ` James Bottomley
2019-07-05 16:25 ` Question about ext4 testing: need to produce a high depth extent tree to verify mapping code James Bottomley
2019-07-05 17:39 ` Matthew Wilcox
2019-07-05 18:49 ` James Bottomley
2019-07-05 21:40 ` Darrick J. Wong
2019-07-06 4:02 ` 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=20190706040221.GC11665@mit.edu \
--to=tytso@mit.edu \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.