Re: [PATCH] ramfs fixes

From: Alexander Viro (viro@math.psu.edu)
Date: Sun Jun 18 2000 - 01:41:19 EST


On 17 Jun 2000, Juan J. Quintela wrote:

> >>>>> "al" == Alexander Viro <aviro@redhat.com> writes:
>
> Hi
>
> al> * adds a new method to address_space_operations: void detach_page(page).
> al> Meaning: do all work necessary to make page droppable. For block-based
> al> filesystems it's block_destroy_buffers(). For ramfs - ClearPageDirty().
> al> It is used by truncate_complete_page() and truncate_all_inode_pages() -
> al> i.e. whenever we are getting rid of a page due to truncate() or final
> al> iput() after unlink().
>
> Al, do you see any problem to my previous patch to the list about
> including ClearPageDirty(page) in remove_inode_page()???

Erm... Look what block_destroy_buffers() does: it notifies the underlying
layer that page is going away, so it must finish whatever it was doing
with the page, do whatever it takes to make it clean and fsck off. It
makes sense for _all_ filesystems. For block-based ones it's
block_destroy_buffers(), for things like ramfs it's "you want it clean -
get it", for something network-based it may (or not) be "cancel pending
writes", etc. IOW, I think that test for (page->buffers) is wrong - it
just reflects the fact that for all block-based ones we have the same
method. Letting the address_space decide what should be done with such
pages is, IMO, the Right Thing(tm).

-
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 : Fri Jun 23 2000 - 21:00:15 EST