RE: Fw: Linux SMBfs cache problem

From: Anton Ivanov (aivanov@eu.level3.net)
Date: Wed Jan 26 2000 - 12:37:58 EST


-----BEGIN PGP SIGNED MESSAGE-----

On 26-Jan-2000 Jesse Kuang wrote:
>
> ----- Original Message -----
> From: Jesse Kuang <kjx@poboxes.com>
> To: <linux-kernel@vger.rutgers.edu>; <samba@samba.org>
> Sent: Friday, January 14, 2000 4:31 PM
> Subject: Linux SMBfs cache problem
>
>
>> In the MS world, if program keep the file open(never close), the mod
>> time/size of file never get changed whatever the program write, I've a
>> program running on Win95/Win98/Winnt update the file(keep open/never close),
>> the smbfs always get the cached content of file(updated several hours
> later), I had to umount the smbfs then remount it to get updated content
> quickly, while ncpfs has no such problem. Win95/Win98/Winnt's MS network
> filesystem works well.

If I understand you correctly you have run into SMB oplocks.

See samba manual for oplocks (opportunistic locks). Unless you explicitly tell
that a share does not have them the client shall always cache and nothing shall
be updated until client unmounts or runs out of RAM and has to flush
buffers.

As a result you should not write to stuff exported via SMBfs locally or via
another network filesystem unless you have forbidden client side cache. Same
stands for reading. At best you will get incorrect data. At worst (in the write
case) the clients may even crash.

Have a look at the samba docs...

- ----------------------------------
Anton R. Ivanov
IP Engineer Level3 Communications
RIPE: ARI2-RIPE E-Mail: Anton Ivanov <aivanov@eu.level3.net>
@*** Truths of Management (No 4 of 10) ***
      Cash in must exceed cash out.

- ----------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iQEVAwUBOI8w9SlWAw/bM84zAQEmmAf/eyK9eeGqR3Sw6Hqyo1pNCzvIvq0um+1J
sudb2BYs2/YqCeJ78Y/N9ACmnnDK4zokaOUMkOeMpNdAZBQ5tndlRSKm4b454Wmg
8vOIuT9U+3zaW8xZakWQamH0fsQi6In263VM6jqXIgBMgY5K+zXjLcau/naVrYcY
VR0nA0+qbM0Endn/kokSj9ehuwqW+nbnXJfo/gLAgbQdIcKGk/pzXg9Bg1kSeg4y
PL5RQeXI1nqwC3HY59p6iR2afwdOrvoii5jkzHxTPIA2Bs3DUrwqdBDZBxmkfcFc
i4doAnXPBgrcy3Qd5sGUuEWlDrJyYN/aqi+xXVKIca0FMXiZ+FSnJA==
=K8Bm
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:17 EST