Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4077077ybi; Fri, 5 Jul 2019 21:06:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYKMjj+LdUCm6pVtY1duBDHgrySTZ13f7AkiVXRZaqyRoM+b00WlFQAJI2HdSZ+u+ORNTl X-Received: by 2002:a63:c006:: with SMTP id h6mr8854876pgg.285.1562385967856; Fri, 05 Jul 2019 21:06:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562385967; cv=none; d=google.com; s=arc-20160816; b=jWwNIZXivjtwPuTu1xjYe5sg8TukKyNhciMmNQM/bt4mq6zvNyZTFVWk9ADshib7Y5 nKLWq9LHbNbX0wqfSK4tLuIYr05EgJoAoehSUGINKtTvaD7rXVTrq09UsoXHPaaHhe1k Rouy8Ji8LoTnTwkQJZg6KnXfk/UV9M7/gvncP4DF9gGn48VhtAdnXeRRPEmxCGnb57fT AG6MFk9+Kd6INEKMtZPs7FdaSbNVZCKT7IBi4/sikYU4kXScHLk3ecfVRY1DKtPpMArJ WTur74fbeES7OlOOMi5IMaq5631RGCKvEbpEtsan1OTckIw8+srIZ2BxnMmd3MqqWAcD aXbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=qlmhqtGm6Xo/dHcJpcQ9YytZOOD7WUmQYAN3SJG4vl0=; b=0qPY0dYGBmyNp6D6FnfJ+M2q838QqaBTxCyuJ1o2QWE/PS/nt+SE3a5FdHalM9nAK6 ybMUNCWEgJRUW9YsjMu7ROaN9gx5rwJLHyO6QsPaT6MDn0vNykBzOI6POC3hC1ODnUWu RPRKRVDJ3KdD2LcMHHmGzx4rQ1vfAgp/V+UINzKe/zXhvOdKTHPaj7hz7nwQLodQ+fbl SNYVOIIBNbmHIOwMPhcPGHcb9fC2Kc7Uah10aLP4M32yso46cKJYs84Bj5vB2fKniZoh e5QYPE88awL28CRnFHrlr040y/Cm9NZoOgfBwEXIsOMZxc6lDSYdcZ3UHUfFnBTfPD68 CXvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si9904059pjq.35.2019.07.05.21.05.43; Fri, 05 Jul 2019 21:06:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725882AbfGFECl (ORCPT + 99 others); Sat, 6 Jul 2019 00:02:41 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:43473 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725826AbfGFECl (ORCPT ); Sat, 6 Jul 2019 00:02:41 -0400 Received: from callcc.thunk.org ([66.31.38.53]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x6642MTo014588 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 6 Jul 2019 00:02:24 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id EEBD342002E; Sat, 6 Jul 2019 00:02:21 -0400 (EDT) Date: Sat, 6 Jul 2019 00:02:21 -0400 From: "Theodore Ts'o" To: James Bottomley Cc: Matthew Wilcox , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, Parisc List Subject: Re: Question about ext4 testing: need to produce a high depth extent tree to verify mapping code Message-ID: <20190706040221.GC11665@mit.edu> References: <1562021070.2762.36.camel@HansenPartnership.com> <20190702002355.GB3315@mit.edu> <1562028814.2762.50.camel@HansenPartnership.com> <20190702173301.GA3032@mit.edu> <1562095894.3321.52.camel@HansenPartnership.com> <20190702203937.GG3032@mit.edu> <1562343948.2953.8.camel@HansenPartnership.com> <20190705173905.GA32320@bombadil.infradead.org> <1562352542.2953.10.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1562352542.2953.10.camel@HansenPartnership.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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$$