Re: how to write get_block?

Andrea Arcangeli (andrea@suse.de)
Fri, 8 Oct 1999 17:24:05 +0200 (CEST)


On Fri, 8 Oct 1999, Mikulas Patocka wrote:

>How do you manage freeing buffers on rmdir? I don't see any bforget there.
>If you don't free buffers pointing to deallocated space, it can cause data
>corruption.

Replacing all bforget with brelse can't harm. It will only be far slower
as you'll risk to waste time flushing garbage to disk and you'll risk to
go into the shrink_mmap path to get some new buffer (while you are caching
buffers that are containing garbage). BTW, in 2.3.x you only need bforget
for the metadata as flushpage will take care of invalidating the dirty
page-cache and to kill their buffers during truncate_inode_pages.

Andrea

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