public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Raz <raziebe@gmail.com>
Cc: linux-xfs@oss.sgi.com, Asaf Moses <asafm@bitband.com>,
	Ofer Kruzel <ofer@bitband.com>,
	yaronp@bitband.com
Subject: Re: does XFS supports hole punching ?
Date: Mon, 27 Oct 2008 23:14:00 +1100	[thread overview]
Message-ID: <20081027121400.GF4985@disturbed> (raw)
In-Reply-To: <5d96567b0810270457g70b63c77re8841ebd1959f7b7@mail.gmail.com>

On Mon, Oct 27, 2008 at 01:57:08PM +0200, Raz wrote:
> Dave Hello
> I would be grateful if you help me here. man xfsctl was not clear enough.
> I have written a small program that compares the behavior of FREESP
> and UNRESERVE.
> I create a file size 10M, each 1M is filled with aaa.. 2-nd MB filled with bbb
> 3-rd with ccc and so on. I am trying to punch a hole with the bellow program
> and then inspect the file content, size and block map.
> 
> 1.  XFS_IOC_FREESP64 seems to be truncating the file and does not
> create a hole.
> 2.  XFS_IOC_UNRESERVE64 creates a hole and leaves the file size
> unchanged. as the man
>     page says.
> /d1/holely:
>         0: [0..14335]: 96..14431 14336 blocks
>         1: [14336..16383]: hole 2048 blocks
>         2: [16384..20479]: 16480..20575 4096 blocks
> Do a hole blocks count as a the file-system free space  ?

There is no such thing as a "hole block". It's a sparse file - where
there is a hole there are no blocks. i.e. holes are free space.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

      reply	other threads:[~2008-10-27 12:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-22 17:40 does XFS supports hole punching ? Raz
2008-10-22 21:20 ` Dave Chinner
2008-10-27 11:57   ` Raz
2008-10-27 12:14     ` Dave Chinner [this message]

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=20081027121400.GF4985@disturbed \
    --to=david@fromorbit.com \
    --cc=asafm@bitband.com \
    --cc=linux-xfs@oss.sgi.com \
    --cc=ofer@bitband.com \
    --cc=raziebe@gmail.com \
    --cc=yaronp@bitband.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