| To: | "David Chinner" <dgc@xxxxxxx> |
|---|---|
| Subject: | Re: TAKE 972756 - Implement fallocate. |
| From: | "Bhagi rathi" <jahnu77@xxxxxxxxx> |
| Date: | Tue, 6 Nov 2007 22:57:03 +0530 |
| Cc: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=bGZp5kFip+2MK0zxw/wQj1HCX6f9DWekhByHVUd5t/Q=; b=dXFsJn5GKaieMrqaHaA82fXGKfZeeOOK/nTTG9JTzY1ALbKzswlnWYNR0fCGZ42znRrIgHeGYmnWYqqN4dp9FfZVJaxz4DejapzGUM4JNR+KBYoRiJx39/WcftRBufb1L8TD7DHF2Nlq7PnVPfJ/lM0o9xECFxR2bHBUpjiL6Wk= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Y6LFvWyhB8cO/5Xy9+vd2ZMy0ojbdyZB5CywX2ZPZAv/0FvFRYcWyKr7H5qc4hwv/VtGifrDGZ/DdLPd02ARe31qwTV79RxNdb4gxc9ourRmd+2sUH+9gNSWL4yOum9gPkm8gwFdL16bHXxRURwm06PnGCDatLqY0T+PzF0owME= |
| In-reply-to: | <20071106001223.GY66820511@xxxxxxx> |
| References: | <20071102024314.9BF3458C38F7@xxxxxxxxxxxxxxxxxxxxxxx> <cc7060690711051042h5c39c540mf60f95e2f67c7bd7@xxxxxxxxxxxxxx> <20071106001223.GY66820511@xxxxxxx> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
File is of size 1k. A 4k block is allocated as file-system block size is 4k. Preallocation happened from 1k to 256k. Now, it looks to me that we have un-written extents from 4k to 256k. There is no guarantee that data from 1k to 4k is all zero'es. Fallocate is updating size. Hence on subsequent read, we can get garbage from 1k to 4k and all zero'es from 4k to 256k Is the expectation here is application should take the responsibility of zero'ing data? I still need to through fallocate requirements. -Thanks, Bhagi. On 11/6/07, David Chinner <dgc@xxxxxxx> wrote: > > 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 > [[HTML alternate version deleted]] |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: xfs crash, Cedric - Equinoxe Media |
|---|---|
| Next by Date: | use is_power_of_2() macro?, Robert P. J. Day |
| Previous by Thread: | Re: TAKE 972756 - Implement fallocate., David Chinner |
| Next by Thread: | Re: TAKE 972756 - Implement fallocate., Eric Sandeen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |