Re: [PATCH]: reiser4 [5/8] export remove_from_page_cache()

Nikita Danilov (Nikita@Namesys.COM)
Thu, 31 Oct 2002 21:25:24 +0300


Andreas Dilger writes:
> On Oct 31, 2002 16:31 +0000, Christoph Hellwig wrote:
> > On Thu, Oct 31, 2002 at 07:24:40PM +0300, Nikita Danilov wrote:
> > > Reiser4 stores meta-data in a huge balanced tree. This tree is kept
> > > (partially) in the page cache. All pages in this tree are attached to
> > > "fake" inode. Sometimes you need to remove node from the tree. At this
> > > moment page has to be removed from the fake inode mapping.
> >
> > What about chaing truncate_inode_pages to take an additional len
> > argument so you don't have to remove all pages past an offset?
>
> That would be what we have been calling "punch", and is quite useful
> for putting holes in files (i.e. making them sparse again). This
> can be used for InterMezzo (among other things) so that the KML log
> file can be growing at the end, but being punched out at the start
> so it doesn't use up a lot of disk space.

Abusing truncate for such things will remain abuse exactly. Separate
interface is required.

>
> Not that I'm holding my breath on getting this in the kernel, but
> it is definitely useful.
>
> Cheers, Andreas

Nikita.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/