All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Chow <davidchow@shaolinmicro.com>
To: trond.myklebust@fys.uio.no
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: nfs3_proc_write()
Date: Thu, 03 Jul 2003 20:29:55 +0800	[thread overview]
Message-ID: <3F0421C3.50000@shaolinmicro.com> (raw)
In-Reply-To: 16132.6203.796332.727898@charged.uio.no


Trond Myklebust wrote:

>>>>>>" " == Trond Myklebust <trond.myklebust@fys.uio.no> writes:
>>>>>>            
>>>>>>
>
>     > You don't want to be writing wsize bytes unless wsize <=
>     > PAGE_SIZE. My guess is that this is why you are seeing the
>     > exception.
>
>Actually, thinking about it one more time...
>
>You've just thrown the file offset as the argument to ->write()
>instead of setting the offset relative to the start of the page,
>haven't you?
>
>That will *seriously* confuse the RPC sendmsg() code (which is where
>you say the Oops occurs). It just wants to know at what offset within
>the page you specified it is supposed to start sending data...
>
>Cheers,
>  Trond
>  
>
Yep, I've just discovered and fix the problem by adding two extra 
rpc_nfs_ops called offset_read() and offset_wirte() which allow 
read/write from arbitrary offsets. Some preliminary test has passed.

I think using page_offset(page) to calculate the offset from 
PAGE_CACHE_SIZE is not a pretty good idea. As this interface doesn't 
look like nfs protocol 2/3/4 . Also, it will prohitbit any 
implementation of swap over NFS because page->index has no meaning to 
the actual writing offset of the swapfile.  Anyway, it is only my 
personal recommendation, but looks like it does prohibits some 
functionality. Thanks for your comment.

regards,
David Chow


  reply	other threads:[~2003-07-03 12:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-03 11:09 nfs3_proc_write() David Chow
2003-07-03 11:30 ` nfs3_proc_write() Trond Myklebust
2003-07-03 11:49   ` nfs3_proc_write() Trond Myklebust
2003-07-03 12:29     ` David Chow [this message]
2003-07-03 12:55       ` nfs3_proc_write() Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F0421C3.50000@shaolinmicro.com \
    --to=davidchow@shaolinmicro.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.