[lkml]   [2002]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] expanding truncate

On Thu, Jan 03, 2002 at 12:25:34PM +0000, Alan Cox wrote:
> > This patch makes sure that indirect pointers for holes are correctly filled in by zeroes at
> > hole-creation time. (Author is Chris Mason. fs/buffer.c part (generic_cont_expand) were written by
> > Alexander Viro)
> Why is that even needed. If you truncate a file larger it doesn't need to
> fill in the datablocks until they are touched surely
Purpose of this patch is of course not to fill in the datablocks with zeroes.
The purpose (as applied to reiserfs) is to fill indirect data pointers (that is - pointers to real data blocks)
with zeroes (and to organize proper in-tree data structure for such pointers).
As of now such organization and zero-filling is done on a lazy manner at disk-flushing time.
Unfortunatelly this leads to races in the code.
I do not know why parts of this code can be needed by other filesystem and why Al Viro put it in generic VFS
code. (but he can comment on it, I think)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:15    [W:0.079 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site