[Top] [All Lists]

file preallocation without unwritten flag being set

To: xfs@xxxxxxxxxxx
Subject: file preallocation without unwritten flag being set
From: p v <pvlogin@xxxxxxxxx>
Date: Tue, 12 May 2009 16:02:05 -0700 (PDT)
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1242169327; bh=ynPKTz4omuETJ3zc7/foU7HXmqam/wbpwzVnI5FXBNk=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=Rcd0sQZjzWiX5faCAYVUihr7f3AuKzqWMbhpBlnS6zahERg6pGrzVSFXDUGTUFngxMX3gD6wkjVzway+msKRkfvLfuwNZ9aYRtORpVrYWhZBcqheYX+it6MgtZx4cR8Gk+4j21iFKeK1H7nBL4hbgJraGcSVS0JGrtlIlFrW2QU=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=K+GehVPfD4erNV6YWOIgs/xZKbgpxfmh1pUtSpDkxBds8gNfuwaKX5LkKbSsQ4wInPmPfVPVWcXMRst96SZJphr/XbMiEJtaS4oN1H7DckEW+gthsO/qrTzW13M1c5s//VrYRIOx6/+vtLPu2ubW03kGyvBag8NRnCisz5+LDhg=;


I need to create large files fast without initializing them - in the past I 
used these steps -

mkfs -t xfs -f -d unwritten=0 /dev/sda1
mount -t xfs -o noatime /dev/sda1 /hay
touch /hay/foo
xfs_io /hay/foo
xfs_io> resvsp 0 1024g
xfs_io> quit
ls -i /hay/foo
131 /hay/foo
umount /hay
xfs_db -x /dev/sda1
xfs_db> inode 131
xfs_db> write core.size 1099511627776
core.size = 1099511627776
xfs_db> q

But unwritten=0 is failing as unrecognized option now (was it deprecated????) 
so I tried to clear the unwritten extent flag directly -

xfs_db> a u.bmbt.ptrs[1]
xfs_db> write recs[1].extentflag 0
recs[1].extentflag = 1

It just won't change to 0 - any way to do this? Or is there any straightforward 
way to preallocate a large file and set it's file size without the unwritten 
flags being turned on?


Peter Vajgel


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