Re: PATCH: Rewrite of truncate_inode_pages (WIP)

From: Trond Myklebust (trond.myklebust@fys.uio.no)
Date: Wed May 31 2000 - 03:58:42 EST


>>>>> " " == Juan J Quintela <quintela@fi.udc.es> writes:

> This patch does:

> - defines a new function: discard_buffer, it will lock the buffer
> (waiting if needed) and remove the buffer from all the
> queues. It is like unmap_buffer, but makes sure that we
> don't do any IO and that we remove the buffer from all the
> lists.

> - defines a new function: block_destroy_buffers: it is a mix of
> block_flushpage and do_try_to_free_pages. It will make all
> the buffers in that page disappear calling discard_buffer.
> Notice the way that we iterate through all the buffer heads.
> I think that it is not racy, but I would like to hear
> comments from people than know more about buffer heads
> handling.

> - I change invalidate_inode_pages (again). Now block_destroy_buffers
> can wait, then we are *civilized* citizens and drop any lock
> that we have before call that block_destroy_buffers, and
> reaquire later.

This is a bug! invalidate_inode_pages() is not supposed to invalidate
pending writes. It is only supposed to invalidate the page cache.

Also, it is pointless to add block device-specific code to that
particular function since no block devices actually use it.

Cheers,
  Trond

-
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/



This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:26 EST