| To: | Raz <raziebe@xxxxxxxxx> |
|---|---|
| Subject: | Re: does XFS supports hole punching ? |
| From: | Dave Chinner <david@xxxxxxxxxxxxx> |
| Date: | Mon, 27 Oct 2008 23:14:00 +1100 |
| Cc: | linux-xfs@xxxxxxxxxxx, Asaf Moses <asafm@xxxxxxxxxxx>, Ofer Kruzel <ofer@xxxxxxxxxxx>, yaronp@xxxxxxxxxxx |
| In-reply-to: | <5d96567b0810270457g70b63c77re8841ebd1959f7b7@mail.gmail.com> |
| Mail-followup-to: | Raz <raziebe@xxxxxxxxx>, linux-xfs@xxxxxxxxxxx, Asaf Moses <asafm@xxxxxxxxxxx>, Ofer Kruzel <ofer@xxxxxxxxxxx>, yaronp@xxxxxxxxxxx |
| References: | <5d96567b0810221040m17d73871iff00d56bf07479c2@mail.gmail.com> <20081022212034.GQ18495@disturbed> <5d96567b0810270457g70b63c77re8841ebd1959f7b7@mail.gmail.com> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.18 (2008-05-17) |
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@xxxxxxxxxxxxx |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: does XFS supports hole punching ?, Raz |
|---|---|
| Next by Date: | Re: Map a disk LBA to filename?, Carsten Aulbert |
| Previous by Thread: | Re: does XFS supports hole punching ?, Raz |
| Next by Thread: | [PATCH] xfs_repair: print superblock offsets and denial reasons, KELEMEN Peter |
| Indexes: | [Date] [Thread] [Top] [All Lists] |