public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: p v <pvlogin@yahoo.com>
Cc: xfs@oss.sgi.com
Subject: Re: file preallocation without unwritten flag being set
Date: Tue, 12 May 2009 19:04:06 -0500	[thread overview]
Message-ID: <4A0A0E76.6000701@sandeen.net> (raw)
In-Reply-To: <283244.29270.qm@web65608.mail.ac4.yahoo.com>

p v wrote:
> 
> Hello,
> 
> 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

Is there a reason that you don't want the unwritten flag set?  (You know
that not using the unwritten extents feature exposes garbage from the
disk in this case?)

There may well be a legit reason but I just want to make sure you're
doing what you think you're doing :)

Thanks,
-Eric

> 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 xfs_db>
> 
> 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?
> 
> Thanks
> 
> Peter Vajgel
> 
> 
> 
> 
> 
> _______________________________________________ xfs mailing list 
> xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs
> 

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

  reply	other threads:[~2009-05-13  0:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-12 23:02 file preallocation without unwritten flag being set p v
2009-05-13  0:04 ` Eric Sandeen [this message]
2009-05-13  4:34   ` p v
2009-05-13  5:08     ` Eric Sandeen
2009-05-13 21:05       ` p v
2009-05-13 21:48         ` Eric Sandeen
2009-05-13 22:28         ` Dave Chinner
2009-05-13 23:51           ` p v
2009-05-14  0:17             ` Eric Sandeen
2009-05-14  0:34               ` Dave Chinner
2009-05-14  0:41                 ` Eric Sandeen

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=4A0A0E76.6000701@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=pvlogin@yahoo.com \
    --cc=xfs@oss.sgi.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox