On 10/12/07, Alain M. <alainm@xxxxxxxxx> wrote: > > Sorry if I may seam a little dumb, but some time ago Bart said that lock > did NOT work... and I googled about cifs and could not really understand > the details. Locking "works", but not 100%. The problem is that DOS has 5 different locking modes (compat, deny read, deny write, deny all, and deny none), but POSIX only 3 (none, read, and write). So somehow DOSEMU maps 5 to 3 and tries to be reasonable, but it is a heuristic. It may work, or it may not work for a particular application in a particular situation. And there's a chain: DOSEMU -1> Linux fs = cifs -2> samba or Windows server -1> translates DOS locks to POSIX locks (lredir'ed drive). -2> (may) do the reverse (mounted drive using the Linux kernel cifs module). smbfs used to do nothing at all with POSIX locks at -2> so it was broken. cifs now does it better (possibly as well as two DOSEMU's sharing files on an ext3 filesystem by now); if the samba server implements POSIX extensions there isn't even a lock translation anymore for step 2. Having DOSEMU talk directly to the samba server could be 100% reliable but a bit hard to setup (setup networking in DOSEMU, and install a DOS samba client in it). Bart - To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html