public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Jef Fox <jef.fox@kinetx.com>
Cc: xfs@oss.sgi.com
Subject: Re: XFS Preallocation
Date: Sat, 29 Jan 2011 11:17:00 +1100	[thread overview]
Message-ID: <20110129001700.GZ21311@dastard> (raw)
In-Reply-To: <155CAEA5D902E7429569DD197567724A01534D60@mail1.ad.kinetx.com>

On Fri, Jan 28, 2011 at 10:33:03AM -0700, Jef Fox wrote:
> I guess, disregard my previous message.  After some further testing of
> examining the hard disk blocks, we see what you are saying - the file is
> presented at 0s to the user even if the blocks are changed on the hard
> disk.  So, we will always see 0s until we write to the extent.
> 
> So, I think our only question now is if there is a way to force the
> extents to be marked as allocated without writing all of the data?  That
> is, is there a fast way to lay down a file(s) of 1G size without
> actually writing 1G of info.

Preallocation is the only option. Allowing preallocation without
marking extents as unwritten opens a massive security hole (i.e.
exposes stale data) so I say no to any request for addition of such
functionality (and have for years).

You've already demonstrated the workaround you can apply to the
problem for your very specialised application - when you put the
disk back into the original machine you can read the disk blocks
directly to get the data. i.e. use fiemap to map the location of the
file on disk and then read the data directly from the block device
underneath the filesystem...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

  reply	other threads:[~2011-01-29  0:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-28  2:05 XFS Preallocation Jef Fox
2011-01-28  4:52 ` Dave Chinner
2011-01-28 15:15   ` Jef Fox
2011-01-28 17:33   ` Jef Fox
2011-01-29  0:17     ` Dave Chinner [this message]
2011-02-01  4:45       ` Peter Vajgel
2011-02-01  8:03         ` Dave Chinner
2011-02-01 19:20           ` Peter Vajgel
2011-02-01 20:12             ` Stan Hoeppner
2011-02-01 22:47               ` Peter Vajgel
2011-02-02  0:07             ` Dave Chinner

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=20110129001700.GZ21311@dastard \
    --to=david@fromorbit.com \
    --cc=jef.fox@kinetx.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