xfs
[Top] [All Lists]

Re: sparsify - utility to punch out blocks of 0s in a file

To: Eric Sandeen <sandeen@xxxxxxxxxx>
Subject: Re: sparsify - utility to punch out blocks of 0s in a file
From: Raghavendra D Prabhu <raghu.prabhu13@xxxxxxxxx>
Date: Sun, 5 Feb 2012 20:35:44 +0530
Cc: ext4 development <linux-ext4@xxxxxxxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :x-operating-system:x-editor:user-agent; bh=QtphGBlsSM00IjJYuX08m5V8/NdoiZ0bCxNQh8YRWO8=; b=ksfwKYMQMgRPdpKENjSLkd/ykFF81IQDKmDAaj64dwr36INBWQgxWAl8e/bFzmrGm8 qe5jdbSnhFEY0naBJQUkBYovl/lbWHTZ69ngqBnUIHbvI+kGw/uuXYxbnjF+SIGih9CR Ltdhs1nSEWQORAyHO2WBXBOmcrsq2KC8PFh4k=
In-reply-to: <4F2D90B6.4070008@xxxxxxxxxx>
Mail-followup-to: Eric Sandeen <sandeen@xxxxxxxxxx>, ext4 development <linux-ext4@xxxxxxxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
References: <4F2D8F30.3090802@xxxxxxxxxx> <4F2D90B6.4070008@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-12-30)
Hi,


* On Sat, Feb 04, 2012 at 02:10:30PM -0600, Eric Sandeen <sandeen@xxxxxxxxxx> 
wrote:
On 2/4/12 2:04 PM, 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.

Gah, of course I sent the version with the actual hole punch commented out ;)
Try this one.

[root@inode sparsify]# ./sparsify -v fsfile
blocksize is 4096
orig start/end 0/536870912/0
new start/end/min 0/536870912/4096
punching out holes of minimum size 4096 in range 0-536870912
punching at 16384 len 16384
punching at 49152 len 134168576
punching at 134234112 len 134201344
punching at 268455936 len 134197248
punching at 402669568 len 134201344
[root@inode sparsify]#

Hm but something is weird, right after the punch-out xfs says
it uses 84K:

[root@inode sparsify]# du -hc fsfile
84K     fsfile
84K     total

but then after an xfs_repair it looks saner:
# du -hc fsfile
4.8M    fsfile
4.8M    total

something to look into I guess... weird.




_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


So I tried with both resparsify and with cp --sparse, the results before xfs_repair looks different (5 extents vs 1) but after that it looks similar (5 extents vs 4)


Regards,
--
Raghavendra Prabhu
GPG Id : 0xD72BE977
Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977
www: wnohang.net

Attachment: att
Description: Text document

Attachment: pgpV9xWtTmR9O.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>