From: "Petr Vandrovec" <VANDROVE@vc.cvut.cz>
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: Fri, 4 Jan 2002 13:22:57 +0100 [thread overview]
Message-ID: <DEEF6861A2B@vcnet.vc.cvut.cz> (raw)
On 4 Jan 02 at 0:48, Urban Widmark wrote:
> On Thu, 3 Jan 2002, Petr Vandrovec wrote:
>
> > On 3 Jan 02 at 13:37, Linus Torvalds wrote:
> > >
> > > (Not as horrible as the NCPFS thing that doesn't understand about the page
> > > cache at all, but still..)
> >
> > Unfortunately it is not easy for me to add pagecache support
> > to ncpfs, as couple of ncpfs users uses ncpfs in shared environment
> > with database record locking, and if I'll now read full 4KB instead of
> > 128B record, it can clash with records locked by other clients.
>
> Does the locks prevent you from even looking? You could read only the
> parts requested if the file has locks and fill the rest with 0. Only using
> the page cache if there are no locks. Not too pretty but ...
It results in short read when there is partial overlap, or error if
overlap is complete.
> A write of 128 bytes to a file cause a commit_write of 128 bytes, if I am
> reading generic_file_write correctly. So that should not cause it to write
> the full page and that would be ok for the locking case.
OK. Thanks.
> > I can for sure add `leases' like Novell Client for Windows does for
> > possibility of file caching, but I'm not sure whether size of code
> > needed for supporting this (and for supporting server driven
> > cache flushes) is worth of effort.
>
> smbfs needs these for cooperating clients to work. It can only cache data
> if it has a lease. If someone else is also accessing the file then each
> smb_file_read must re-read the page.
It is same for Netware, with minor difference that NW4 refuses 'leases'
by default, and on NW5 it should be disabled by default, as otherwise
server can go mad when some client errors happen.
> > P.S.: And as NCP protocol is totally synchronous (even if it uses
> > TCP, I explicitly asked in Utah), only local file caching can increase
> > ncpfs performance, as there is no such thing like asynchronous file
> > read/write...
>
> SMB has no async read/write, but all requests are marked with an ID and it
> is allowed to have a certain number of simultaneous requests in transit.
That's difference. With NCP you can have only one request in flight.
For sure on IPX and UDP, and according to Novell even on TCP.
> Even without multiple requests you could let ncpfs accept one read
> request, send that to the server and return without waiting for the reply.
On IPX maximum compatible block size is 1024 bytes... so reading one page
requires 4 exchanges. On UDP/TCP it is easier, but unfortunately majority
of installed servers is still IPX-only (at least I have this feedback
from users).
> The readahead code may then queue up the next request for ncpfs, and ncpfs
> could process that while the previously read page is returned to the user.
It would require either another kernel thread doing readahead, or I have
to submit new request from IPX/UDP data_ready callbacks (for TCP it needs
another thread without discussion, as data_ready callback documentation
says that I cannot read data/send new data directly from it... or maybe
special ncpfs bottomhalf).
Best regards,
Petr Vandrovec
vandrove@vc.cvut.cz
next reply other threads:[~2002-01-04 12:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-04 12:22 Petr Vandrovec [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-01-03 22:56 [PATCH] smbfs fsx'ed Petr Vandrovec
2002-01-03 23:48 ` Urban Widmark
2002-01-03 22:51 Dan Kegel
2002-01-03 23:02 ` Urban Widmark
2002-01-03 12:20 Urban Widmark
2002-01-03 21:37 ` Linus Torvalds
2002-01-03 22:49 ` Urban Widmark
2002-01-04 11:43 ` 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=DEEF6861A2B@vcnet.vc.cvut.cz \
--to=vandrove@vc.cvut.cz \
--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