[second try, I'll cc the mailing list for clarification; problem was:
DOSEMU executes exe file, uses ??? mode. the exe file is on a Linux samba
server, mounted via smbfs.
As long as the exe file is opened, a Win9x samba client refuses to open
the file.
]

On 30 Oct 2002, Michal Samek wrote:

> I can understand that -D+Dd logs disk operations but I can't locate
> where dosemu writes it's log - there is no terminal output and /var/log
> files are same sized as before running dosemu. Where I can find logs?

If you use "dosemu" then the log is in boot.log in ~/dosemu, otherwise
you have to use

dos -D+Dd -o log

and find the log output in the file named log in the current directory.

> It looks like when dosemu should really open the file in READ-SHARE mode
> (don't remember exactly dos modes) it opens the file in READ-DENY mode.
> And still when it opens the file in READ-DENY mode (locking problem) it
> results in READ-SHARE mode which is the same bad as before. But now it's
> sure that it IS POSSIBLE to lock the file via dosemu. Unfortunatelly it
> happens when it shouldn't and otherwise if you understand me :)

If DOS opens a file in COMPATIBILITY or DENY_NONE mode then DOSEMU will
not apply any lock.

If DOS opens a file in DENY_WRITE mode (which you claim it does
basically, but then, I don't have a log yet) then DOSEMU will apply an
F_RDLCK lock from 2^31-1 to 2^31.

If DOS opens a file in DENY_READ mode then DOSEMU will apply a F_WRLCK
(exclusive) lock from 2^31-1 to 2^31, except when the file is opened R/O.

If DOS opens a file in DENY_ALL mode then DOSEMU will apply an F_RDLCK
(shared) lock if the file is opened R/O and an F_WRLCK (exclusive) lock
from 2^31-1 to 2^31 if the file is opened R/W or write-only.

A UNIX F_RDLCK (shared) _advisory_ lock (which is what DOSEMU applies in
the case you describe) basically tells other processes that they cannot
lock that part of the file for writing, so this very roughly corresponds
to DOS DENY_WRITE. (but not completely; see the table in mfs.c for
differences in behaviour (modulo bugs)).

Now I'm not sure where the bug is (DOSEMU, smbfs, Samba, or Win9x).

Bart


-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to