public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Chinner <dgc@sgi.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: "David Chinner" <dgc@sgi.com>, "Łukasz Fibinger" <lucke@o2.pl>,
	xfs@oss.sgi.com
Subject: Re: RESVSP problems
Date: Tue, 8 May 2007 15:25:21 +1000	[thread overview]
Message-ID: <20070508052521.GH32602149@melbourne.sgi.com> (raw)
In-Reply-To: <4640048B.6070803@sandeen.net>

On Tue, May 08, 2007 at 12:03:07AM -0500, Eric Sandeen wrote:
> David Chinner wrote:
> 
> >>>yeah... ISTR that the arguments are funky.  I can't remember if it's a
> >>>bug or not.  :)  FWIW, allocsp just writes zeros to the file, so you
> >>>could do it just as well from userspace w/ no fancy ioctls...  ALLOCSP
> >>>is a bit pointless if you ask me... though maybe someone knows why it's
> >>>there :)
> >>Let me say that I have noticed that using ALLOCSP seems to create less 
> >>extents than posix_fallocate/manual zeroing.
> >
> >Yes, that's likely ;)
> >
> >There's work currently active to make posix_fallocate() do the same thing
> >as ALLOCSP (i.e. call into the filesystem and let it do smart stuff), but
> >that's a ways off yet...
> 
> Dave, doesn't ALLOCSP actually create actual zeroed space though? 

Ah, yes it does - I was sort of lumping allocsp/resvsp together as one
there.

> Pretty much as posix_fallocate from userspace does today, maybe with 
> better allocation...

Better allocations and with no ENOSPC-after-partial-zeroing problems,
either.

> And "smart stuff" would be *not* needing to write 
> zeros.... i.e. what RESVSP does.

Yup. I've implemented fallocate() with the equivalent of RESVSP.
xfs_zero_eof() is smart enough to not try to zero unwritten extents
so changing the filesize after preallocation is effectively a no-op ;)

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

  reply	other threads:[~2007-05-08  5:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-07 18:04 RESVSP problems Łukasz Fibinger
2007-05-07 18:43 ` Eric Sandeen
2007-05-07 18:58   ` Łukasz Fibinger
2007-05-08  0:59     ` David Chinner
2007-05-08  5:03       ` Eric Sandeen
2007-05-08  5:25         ` David Chinner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-05-24 11:24 Łukasz Fibinger
2007-05-25  5:06 ` David Chinner
2007-05-25 10:24   ` Łukasz Fibinger
2007-05-25 11:24     ` David Chinner
2007-05-25 13:37       ` Łukasz Fibinger
2007-05-25 14:19       ` Christoph Hellwig
2007-05-28  0:50         ` David 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=20070508052521.GH32602149@melbourne.sgi.com \
    --to=dgc@sgi.com \
    --cc=lucke@o2.pl \
    --cc=sandeen@sandeen.net \
    --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