public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Who knows what was changed in 1.1.3.3 or 1.1.3.4 about file locking?
@ 2002-11-02 21:42 Bart Oldeman
  0 siblings, 0 replies; 11+ messages in thread
From: Bart Oldeman @ 2002-11-02 21:42 UTC (permalink / raw)
  To: Michal Samek; +Cc: linux-msdos

[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



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Who knows what was changed in 1.1.3.3 or 1.1.3.4 about file locking?
@ 2002-10-29 14:55 Michal Samek
  0 siblings, 0 replies; 11+ messages in thread
From: Michal Samek @ 2002-10-29 14:55 UTC (permalink / raw)
  To: Linux-MSDOS Mailing list

Hi,
I am using 1.1.3.4 but not sure if it started with 1.1.3.3 patch:

when I start the .exe app within dosemu session, it's impossible to
start another instance within win session (data/app on samba, lredired
smbmounted on linux), .exe file is locked (open READ DENY ALL if I can
remember mode). 

I'm sure that before 1.1.3.* it was possible.

But I think it can be someone's try to fix the file locking problem, am
I right? If so, something really changed, but not at all good. Maybe
someone could try to correct it?

-- 
Michal Samek <webmaster@tony.cz>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-11-14 14:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1036654059.16614.24.camel@localhost.localdomain>
2002-11-07 23:00 ` Who knows what was changed in 1.1.3.3 or 1.1.3.4 about file locking? Bart Oldeman
2002-11-08  7:09   ` Michal Samek
2002-11-08  9:45     ` Michal Samek
2002-11-10 10:29   ` Sergey Suleymanov
2002-11-10 17:47     ` Bart Oldeman
2002-11-11  6:01       ` Sergey Suleymanov
2002-11-10 18:55     ` Przemyslaw Czerpak
2002-11-14 13:37   ` Michal Samek
2002-11-14 14:12   ` Michal Samek
2002-11-02 21:42 Bart Oldeman
  -- strict thread matches above, loose matches on Subject: below --
2002-10-29 14:55 Michal Samek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox