| To: | Ming Zhang <mingz@xxxxxxxxxxx> |
|---|---|
| Subject: | Re: disable preallocation |
| From: | David Chinner <dgc@xxxxxxx> |
| Date: | Wed, 19 Apr 2006 10:51:33 +1000 |
| Cc: | Iustin Pop <iusty@xxxxxxxxx>, linux-xfs@xxxxxxxxxxx |
| In-reply-to: | <1145406846.8601.216.camel@localhost.localdomain> |
| References: | <1145391567.8601.183.camel@localhost.localdomain> <20060418214252.GA3300@lapi.hq.k1024.org> <1145397286.8601.202.camel@localhost.localdomain> <20060418223553.GB3300@lapi.hq.k1024.org> <1145401592.8601.211.camel@localhost.localdomain> <20060418232920.GC3300@lapi.hq.k1024.org> <1145404885.8601.214.camel@localhost.localdomain> <20060419000409.GD3300@lapi.hq.k1024.org> <1145406846.8601.216.camel@localhost.localdomain> |
| Sender: | linux-xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.4.2.1i |
On Tue, Apr 18, 2006 at 08:34:05PM -0400, Ming Zhang wrote: > > so u mean even there are preallocated space, file system should be able > to know that is a hole, and that space is preallocated, not prewritten, Preallocated space in XFS is not a hole - it is an unwritten extent. That is different from a hole in that the extent has been physically allocated, just marked as unwritten. Any attempt to read an unwritten extent will return lots of zero, just like reading from a hole. > and it will return all 0? where is this posix standard i can check? thx posix_fallocate()? Except it doesn't define what the contents of the area allocated must contain, and is not implemented on Linux in the filesystems. Instead, it is poorly emulated in glibc by writing chunks of zeros to disk and hence it returns zeros when the space is read before it is "written". Cheers, Dave. -- Dave Chinner R&D Software Enginner SGI Australian Software Group |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: disable preallocation, Ming Zhang |
|---|---|
| Next by Date: | Re: disable preallocation, Ming Zhang |
| Previous by Thread: | Re: disable preallocation, Ming Zhang |
| Next by Thread: | Re: disable preallocation, Ming Zhang |
| Indexes: | [Date] [Thread] [Top] [All Lists] |