From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Urban Widmark <urban@teststation.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
Dave Jones <davej@suse.de>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] smbfs fsx'ed
Date: 04 Jan 2002 12:43:50 +0100 [thread overview]
Message-ID: <shsu1u2l4sp.fsf@charged.uio.no> (raw)
In-Reply-To: <Pine.LNX.4.33.0201032257300.28529-100000@cola.teststation.com>
In-Reply-To: <Pine.LNX.4.33.0201032257300.28529-100000@cola.teststation.com>
>>>>> " " == Urban Widmark <urban@teststation.com> writes:
> The current code synchronizes all threads on the same mount
> since all threads use "server->packet" as a buffer for send and
> receive. I have some code where I have tried to copy how I
> believe nfs does things with a "struct request" for each
> caller.
All NFS does is to wrap the pages to read/write with a struct
'nfs_page' that allows us to string them together in a list. When
somebody calls sync_page() or decides to flush out the pending writes,
we collate these 'nfs_page' things into appropriately sized private
lists (NFS has a server-provided upper limit on the number of bytes
you can send) and generate an RPC call.
In addition, there is code to limit the total number of pending
nfs_page structs (in order to avoid trouble due to flooding memory
with cached requests), and for managing request timeouts.
See the files include/linux/nfs_page.h, and fs/nfs/pagelist.c for details.
The struct nfs_page does contain one or 2 entries which are
NFS-specific (the RPC credential and commit cookie), but if you ignore
them, the rest of the machinery should be fairly easily adaptable for
reuse in the SMB code. One would perhaps have to rip out the
NFS_SERVER() stuff in pagelist.c (which is used to maintain a couple
of mount-global lists), and replace it with a slightly more generic
interface, but that's all trivial stuff.
Cheers,
Trond
next prev parent reply other threads:[~2002-01-04 11:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-03 12:20 [PATCH] smbfs fsx'ed Urban Widmark
2002-01-03 21:37 ` Linus Torvalds
2002-01-03 22:49 ` Urban Widmark
2002-01-04 11:43 ` Trond Myklebust [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-01-03 22:51 Dan Kegel
2002-01-03 23:02 ` Urban Widmark
2002-01-03 22:56 Petr Vandrovec
2002-01-03 23:48 ` Urban Widmark
2002-01-04 12:22 Petr Vandrovec
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=shsu1u2l4sp.fsf@charged.uio.no \
--to=trond.myklebust@fys.uio.no \
--cc=davej@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=urban@teststation.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox