On Thu, 21 Dec 2006, David Chinner wrote: > > XFS appears to call clear_page_dirty to get the mapping tree dirty > tag set correctly at the same time the page dirty flag is cleared. I > note that this can be done by set_page_writeback() if we clear the > dirty flag on the page first when we are writing back the entire page. Yes. I think the XFS routine should just use "clear_page_dirty_fir_io()", since that matches what it actually wants to do (surprise surprise, it's going to write it out). HOWEVER. Why is it conditional? Can somebody who understands XFS tell me why "clear_dirty" would ever be 0? I can grep the sources, and I see that it's an unconditional 1 in one call-site, but then in the other one it does xfs_start_page_writeback(page, wbc, !page_dirty, count); and that part just blows my mind. Why would you do a xfs_start_page_writeback() and _not_ write the page out? Is this for a partial-page-only case? Anyway, your patch looks fine. It seems to be the right thing to do. I'm just wondering why we're not always cleaning the whole page, and why we'd not set it unconditionally dirty? Linus - 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/
- Follow-Ups:
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: David Chinner <dgc@sgi.com>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- References:
- Re: 2.6.19 file content corruption on ext3
- From: Peter Zijlstra <a.p.zijlstra@chello.nl>
- Re: 2.6.19 file content corruption on ext3
- From: Arjan van de Ven <arjan@infradead.org>
- [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Peter Zijlstra <a.p.zijlstra@chello.nl>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Hugh Dickins <hugh@veritas.com>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Peter Zijlstra <a.p.zijlstra@chello.nl>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Martin Michlmayr <tbm@cyrius.com>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Linus Torvalds <torvalds@osdl.org>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Martin Michlmayr <tbm@cyrius.com>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Linus Torvalds <torvalds@osdl.org>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: Linus Torvalds <torvalds@osdl.org>
- Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- From: David Chinner <dgc@sgi.com>
- Re: 2.6.19 file content corruption on ext3
- Prev by Date: Re: Compiling and Loading Kernel Modules in FC5
- Next by Date: [PATCH 1/4] Linux Kernel Markers : Architecture agnostic code.
- Previous by thread: Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- Next by thread: Re: [PATCH] mm: fix page_mkclean_one (was: 2.6.19 file content corruption on ext3)
- Index(es):
![]() |