Re: [rfc][patch 3/5] afs: new aops

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Howells <dhowells@...>
Cc: Andrew Morton <akpm@...>, <linux-fsdevel@...>, <mhalcrow@...>, <phillip@...>, <sfrench@...>
Date: Monday, November 12, 2007 - 8:44 pm

On Tue, Nov 13, 2007 at 12:30:05AM +0000, David Howells wrote:

It takes a pagecache page, yes. If you follow convention, you use
PAGE_CACHE_SIZE for that guy. You don't have to allow PAGE_CACHE_SIZE !=
PAGE_SIZE, and if all the rest of your code is in units of PAGE_SIZE, then
obviously my changing of just the one unit is even more confusing than
the current arrangement ;)



Yes, that's where you come in. You are free (and encouraged) to optimise
this.

Let's see, for a network filesystem this is what you could do:
- if the page is not uptodate at write_begin time, do not bring it uptodate
  (at least, not the region that is going to be written to)
- if the page is not uptodate at write_end time, but the copy was fully
  completed, just mark it uptodate (provided you brought the regions outside
  the copy uptodate).
- if the page is not uptodate and you have a short copy, simply do not
  mark the page uptodate or dirty, and return 0 from write_end, indicating
  that you have committed 0 bytes. The generic code should DTRT.


Or you could:
Pass back a temporary (not pagecache) page in *pagep, and copy that yourself
into the _real_ pagecache page at write_end time, so you know exactly how
big the copy will be (this is basically what the 2copy method does now...
it is probably not as good as the first method I described, but for a
high latency filesystem it may be preferable to always bringing the page
uptodate).

Or: keep track of sub-page dirty / uptodate status eg. with a light weight
buffer_head like structure, so you can actually have partially dirty pages
that are not completely uptodate.

Or... if you can think of another way...

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[rfc][patches] remove -&gt;prepare_write, Nick Piggin, (Mon Nov 12, 3:12 am)
[rfc][patch 5/5] remove prepare_write, Nick Piggin, (Mon Nov 12, 3:23 am)
[rfc][patch 4/5] rd: rewrite rd, Nick Piggin, (Mon Nov 12, 3:20 am)
[rfc][patch 2/5] cifs: new aops, Nick Piggin, (Mon Nov 12, 3:14 am)
[rfc][patch 3/5] afs: new aops, Nick Piggin, (Mon Nov 12, 3:14 am)
Re: [rfc][patch 3/5] afs: new aops, David Howells, (Mon Nov 12, 11:29 am)
Re: [rfc][patch 3/5] afs: new aops, Nick Piggin, (Mon Nov 12, 8:15 pm)
Re: [rfc][patch 3/5] afs: new aops, David Howells, (Mon Nov 12, 8:30 pm)
Re: [rfc][patch 3/5] afs: new aops, Nick Piggin, (Mon Nov 12, 8:44 pm)
Re: [rfc][patch 3/5] afs: new aops, David Howells, (Tue Nov 13, 6:56 am)
Re: [rfc][patch 3/5] afs: new aops, Nick Piggin, (Wed Nov 14, 12:24 am)
Re: [rfc][patch 3/5] afs: new aops, David Howells, (Wed Nov 14, 8:18 am)
Re: [rfc][patch 3/5] afs: new aops, Nick Piggin, (Wed Nov 14, 11:18 am)
Re: [rfc][patch 3/5] afs: new aops, David Howells, (Wed Nov 14, 11:57 am)
Re: [rfc][patch 3/5] afs: new aops, Nick Piggin, (Wed Nov 14, 5:32 pm)
Re: [rfc][patch 3/5] afs: new aops, David Howells, (Thu Nov 15, 8:15 am)
Re: [rfc][patch 3/5] afs: new aops, Nick Piggin, (Thu Nov 15, 5:37 pm)
[rfc][patch 1/5] ecryptfs new aops, Nick Piggin, (Mon Nov 12, 3:13 am)