| To: | mingz@xxxxxxxxxxx |
|---|---|
| Subject: | Re: disable preallocation |
| From: | Eric Sandeen <sandeen@xxxxxxxxxxx> |
| Date: | Thu, 20 Apr 2006 23:14:15 -0500 |
| Cc: | David Chinner <dgc@xxxxxxx>, Iustin Pop <iusty@xxxxxxxxx>, linux-xfs@xxxxxxxxxxx |
| In-reply-to: | <1145412624.25396.8.camel@xxxxxxxxxxxxxxxxxxxxx> |
| References: | <1145391567.8601.183.camel@xxxxxxxxxxxxxxxxxxxxx> <20060418214252.GA3300@xxxxxxxxxxxxxxxxx> <1145397286.8601.202.camel@xxxxxxxxxxxxxxxxxxxxx> <20060418223553.GB3300@xxxxxxxxxxxxxxxxx> <1145401592.8601.211.camel@xxxxxxxxxxxxxxxxxxxxx> <20060418232920.GC3300@xxxxxxxxxxxxxxxxx> <1145404885.8601.214.camel@xxxxxxxxxxxxxxxxxxxxx> <20060419000409.GD3300@xxxxxxxxxxxxxxxxx> <1145406846.8601.216.camel@xxxxxxxxxxxxxxxxxxxxx> <20060419005133.GF7574742@xxxxxxxxxxxxxxxxx> <1145409269.8601.229.camel@xxxxxxxxxxxxxxxxxxxxx> <1145412624.25396.8.camel@xxxxxxxxxxxxxxxxxxxxx> |
| Sender: | linux-xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla Thunderbird 1.0.6 (Macintosh/20050716) |
Ming, the short answer to your original question is that xfs will not give you
back any data that was not explicitly written to the file. Feel free to seek,
allocate, write, truncate, open, close etc to your heart's content. Do a read,
and you will get back either 0s, or data that you wrote.
Run fsx over xfs for a while to convince yourself of this. -Eric Ming Zhang wrote: i finished the reading on related section in ULK and i think i knew why my wrong understanding is wrong now. preallocation is not a persistent action that give the space to file persistently. in fact, it is preserved to that file and if there are write operations on that file, the prealloated space will possibly be used. if nothing happen on that file, file closed, or truncated, that preallocated is freed and maybe new preallocation will be given later. so if there is no write on certain offset, but a seek over it, it will form a hole in that area and no physical storage back it. hope i have a right understanding now. so a read will check inode and find out that no space available for that file block (corresponding disk lba is 0), then it knows it met a hole. could u tell me in which function in xfs code handle this? |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Tuning for tons of small files?, Dave Lloyd |
|---|---|
| Next by Date: | "XFS internal error xfs_ialloc_read_agi", Ryan M. |
| Previous by Thread: | Re: disable preallocation, Ming Zhang |
| Next by Thread: | [PATCH] trivial comment typo, Ming Zhang |
| Indexes: | [Date] [Thread] [Top] [All Lists] |