X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,MIME_QP_LONG_LINE autolearn=ham version=3.4.0-r929098 Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id q15GtWu6054979 for ; Sun, 5 Feb 2012 10:55:32 -0600 X-ASG-Debug-ID: 1328460930-04cbb01fb26b4fd0001-NocioJ Received: from mail.shawcable.com (shawmail.shawcable.com [64.59.128.220]) by cuda.sgi.com with ESMTP id lVBeuNfRJfWchcuZ for ; Sun, 05 Feb 2012 08:55:31 -0800 (PST) X-Barracuda-Envelope-From: adilger@dilger.ca X-Barracuda-Apparent-Source-IP: 64.59.128.220 Received: from bpd2mi3no-svcs.prod.shawcable.com ([10.0.184.122]) by bpd2mo3no-ssvc.prod.shawcable.com with ESMTP; 05 Feb 2012 09:55:30 -0700 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=v9IqiuXHtmwFiI2YJqo6dQmw2SJvdDx3gP8sCAnt4Ec= c=1 sm=1 a=dxcBQLyshEEA:10 a=BLceEmwcHowA:10 a=kj9zAlcOel0A:10 a=k8hqzbHzjweV03hO1KKrVA==:17 a=20KFwNOVAAAA:8 a=BayL72uY4NHKBvb4FJAA:9 a=CjuIK1q_8ugA:10 a=jEp0ucaQiEUA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-IronPort-AV: E=Sophos;i="4.73,365,1325487600"; d="scan'208";a="498710609" Received: from unknown (HELO bpd2mi3no-cmts.prod.shawcable.com) ([192.168.183.122]) by bpd2mi3no-cmts.prod.shawcable.com with ESMTP; 05 Feb 2012 09:55:30 -0700 X-reinject: true Received: from unknown (HELO [192.168.10.170]) ([68.147.208.101]) by bpd2mi3no-dmz.prod.shawcable.com with ESMTP; 05 Feb 2012 09:55:29 -0700 References: <4F2D8F30.3090802@redhat.com> <201202050933.q159XQpB026380@helium.internal.tigress.co.uk> <4F2EB017.5090006@redhat.com> In-Reply-To: <4F2EB017.5090006@redhat.com> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Message-Id: <9C5B5C07-B0E4-4D13-BCFE-7F35162DF5E8@dilger.ca> Content-Transfer-Encoding: quoted-printable Cc: Ron Yorston , "xfs@oss.sgi.com" , "linux-ext4@vger.kernel.org" X-Mailer: iPhone Mail (9A405) From: Andreas Dilger Subject: Re: sparsify - utility to punch out blocks of 0s in a file Date: Sun, 5 Feb 2012 09:55:54 -0700 X-ASG-Orig-Subj: Re: sparsify - utility to punch out blocks of 0s in a file To: Eric Sandeen X-Barracuda-Connect: shawmail.shawcable.com[64.59.128.220] X-Barracuda-Start-Time: 1328460930 X-Barracuda-URL: http://192.48.176.25:80/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at sgi.com X-Barracuda-Spam-Score: 0.82 X-Barracuda-Spam-Status: No, SCORE=0.82 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1.0 tests=MIME_QP_LONG_LINE, MIME_QP_LONG_LINE_2 X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.87692 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 MIME_QP_LONG_LINE RAW: Quoted-printable line longer than 76 chars 0.82 MIME_QP_LONG_LINE_2 RAW: Quoted-printable line longer than 76 chars On 2012-02-05, at 9:36, Eric Sandeen wrote: > On 2/5/12 3:33 AM, Ron Yorston wrote: >> Eric Sandeen wrote: >>> Now that ext4, xfs, & ocfs2 can support punch hole, a tool to >>> "re-sparsify" a file by punching out ranges of 0s might be in order. >>>=20 >>> I'll see if util-linux wants it after it gets beat into shape. >>> (or did a tool like this already exist and I missed it?) >=20 > Matthias' suggestion of adding SEEK_HOLE/SEEK_DATA makes very good sense t= oo. I thought about this, but if SEEK_HOLE/SEEK_DATA (or FIEMAP) worked, then th= e file would already be sparse, so I don't think that will help in this case= ... > I should also untie the read/zero buffer size from the minimum hole size, > we should do optimal IO sizes regardless of the minimum hole size desired.= .. Definitely. 4kB IO is a killer for large files. Cheers, Andreas=