public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: mingz@ele.uri.edu
Cc: linux-xfs@oss.sgi.com
Subject: Re: how to understand allocsp
Date: Thu, 24 Aug 2006 15:53:04 -0500	[thread overview]
Message-ID: <44EE11B0.7010208@sandeen.net> (raw)
In-Reply-To: <1156450310.2700.85.camel@localhost.localdomain>

Ming Zhang wrote:
> Hi All
> 
> Play with xfs_io and feel confused about this allocsp.
> 
> Starting with a empty file.
> 

I honestly never keep this all straight without going back to the code, 
but I'd start by looking at the comments for, and code in, 
xfs_change_file_space and xfs_alloc_file_space.

         /*
          * XFS_IOC_RESVSP and XFS_IOC_UNRESVSP will reserve or unreserve
          * file space.
          * These calls do NOT zero the data space allocated to the file,
          * nor do they change the file size.
          *
          * XFS_IOC_ALLOCSP and XFS_IOC_FREESP will allocate and free file
          * space.
          * These calls cause the new file data to be zeroed and the file
          * size to be changed.
          */

The semantics of all this could be clearer, IMHO.

-Eric

  reply	other threads:[~2006-08-24 20:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-24 20:11 how to understand allocsp Ming Zhang
2006-08-24 20:53 ` Eric Sandeen [this message]
2006-08-24 21:01   ` Ming Zhang

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=44EE11B0.7010208@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=linux-xfs@oss.sgi.com \
    --cc=mingz@ele.uri.edu \
    /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