login
Header Space

 
 

Re: [PATCH] fs: nobh_truncate_page() fix

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Dave Kleikamp <shaggy@...>
Cc: Andrew Morton <akpm@...>, Will Trives <will@...>, <linux-kernel@...>, Nick Piggin <nickpiggin@...>, Chuck Ebbert <cebbert@...>
Date: Monday, March 5, 2007 - 5:43 pm

On Mon, 5 Mar 2007, Dave Kleikamp wrote:

I'm not convinced...

If the page wasn't up-to-date from before, it's *not* necessarily 
up-to-date after the truncate either! So why do we have that at all?

The same comment is true of "nobh_commit_write()" (which _does_ have the 
SetPageUptodate() there).

So I have three questions:

 - why is that valid in the first place (the page is *not* guaranteed to 
   be up-to-date as far as I can see!)

 - why is it valid to do in "nobh_commit_write()"

 - why doesn't "nobh_truncate_page()"
	(a) call nobh_prepare_write() through an indirect pointer?
	(b) call nobh_commit_write() at all? (Yeah, I realize it's because 
	    of brokenness with i_size, so this is more of a "those 
	    functions should be factored out properly" statement rather 
	    than a question.

IOW, I'm sure your patch _fixes_ something, but no, it's certainly not 
obvious to me. A few added comments would be good.. Why is it ok to do 
this on a page that wasn't up-to-date before (since obviously, if it *was* 
up-to-date, it's pointless).

		Linus
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.21-rc2-git3 Unstable for me, Will Trives, (Mon Mar 5, 12:03 am)
Re: 2.6.21-rc2-git3 Unstable for me, Chuck Ebbert, (Mon Mar 5, 10:59 am)
Re: 2.6.21-rc2-git3 Unstable for me, Dave Kleikamp, (Mon Mar 5, 11:36 am)
Re: 2.6.21-rc2-git3 Unstable for me, Dave Kleikamp, (Mon Mar 5, 11:50 am)
Re: 2.6.21-rc2-git3 Unstable for me, Will Trives, (Mon Mar 5, 6:25 pm)
[PATCH] fs: nobh_truncate_page() fix, Dave Kleikamp, (Mon Mar 5, 4:58 pm)
Re: [PATCH] fs: nobh_truncate_page() fix, Linus Torvalds, (Mon Mar 5, 5:43 pm)
Re: [PATCH] fs: nobh_truncate_page() fix, Andrew Morton, (Mon Mar 5, 6:57 pm)
Re: [PATCH] fs: nobh_truncate_page() fix, Dave Kleikamp, (Mon Mar 5, 7:10 pm)
Re: [PATCH] fs: nobh_truncate_page() fix, Andrew Morton, (Mon Mar 5, 7:31 pm)
Re: [PATCH] fs: nobh_truncate_page() fix, Dave Kleikamp, (Mon Mar 5, 7:02 pm)
speck-geostationary