xfs
[Top] [All Lists]

Re: TAKE 972756 - Implement fallocate.

To: Bhagi rathi <jahnu77@xxxxxxxxx>
Subject: Re: TAKE 972756 - Implement fallocate.
From: David Chinner <dgc@xxxxxxx>
Date: Tue, 6 Nov 2007 11:12:23 +1100
Cc: David Chinner <dgc@xxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <cc7060690711051042h5c39c540mf60f95e2f67c7bd7@xxxxxxxxxxxxxx>
References: <20071102024314.9BF3458C38F7@xxxxxxxxxxxxxxxxxxxxxxx> <cc7060690711051042h5c39c540mf60f95e2f67c7bd7@xxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Tue, Nov 06, 2007 at 12:12:52AM +0530, Bhagi rathi wrote:
> David, What happens if offset is not aligned to 4k? Let's say we have a file
> whose size is
> not aligned to 4k. It could have blocks beyond the eof which haven't been
> zero'ed out.

No it won't. They are *preallocated* blocks, which by definition are
zero-filled. Preallocated blocks are marked as unwritten on disk, so
it is known that they contain zeros, even if they lie beyond EOF.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group


<Prev in Thread] Current Thread [Next in Thread>