* problems with locking
@ 2002-11-06 10:59 Siim Vahtre
2002-11-06 11:55 ` Siim Vahtre
0 siblings, 1 reply; 10+ messages in thread
From: Siim Vahtre @ 2002-11-06 10:59 UTC (permalink / raw)
To: linux-msdos
Hi.
I need to use some dosemu clients(running old database programs made in
turbo pascal) that read/write paradox databases on linux samba server.
However, it seems that samba and dosemu doesn't share their thoughts about
file locking.
For example, when I open (read-only!) some file (let's say "L:\test.txt"
that is actually "/mnt/samba/test.txt") then I can't open the same file
with another dosemu. (It says "Access denied.")
smbstatus shows:
Pid DenyMode R/W Oplock Name
2347 DENY_NONE RDRW NONE /mnt/samba/test.txt
DenyMode is DENY_NONE, so I should be able to at least open the file
read_only from another client aswell, right?
Dosemu version is 1.0.2
Samba version is 2.2.3a-6
The OS on Dosemu is FreeDOS (1.1.24c)
And even if I can get this to work... will I be able to use bytelocking
(for databases) aswell?
Or in general - does anyone know how well one old TPascal program with
paradox databases might work on dosemu?
Any hints/helps are deeply appreciated.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: problems with locking
2002-11-06 10:59 problems with locking Siim Vahtre
@ 2002-11-06 11:55 ` Siim Vahtre
2002-11-06 13:44 ` Michal Samek
0 siblings, 1 reply; 10+ messages in thread
From: Siim Vahtre @ 2002-11-06 11:55 UTC (permalink / raw)
To: linux-msdos
> For example, when I open (read-only!) some file (let's say "L:\test.txt"
> that is actually "/mnt/samba/test.txt") then I can't open the same file
> with another dosemu. (It says "Access denied.")
One thing more:
It does not matter HOW I configure the samba. Even if there is no locking
whatsoever, I STILL cannot look at file someone else is _reading_.
If anyone knows how, please help.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: problems with locking
2002-11-06 11:55 ` Siim Vahtre
@ 2002-11-06 13:44 ` Michal Samek
2002-11-06 14:20 ` Siim Vahtre
0 siblings, 1 reply; 10+ messages in thread
From: Michal Samek @ 2002-11-06 13:44 UTC (permalink / raw)
To: Siim Vahtre; +Cc: Linux-MSDOS Mailing list
On St, 2002-11-06 at 12:55, Siim Vahtre wrote:
> > For example, when I open (read-only!) some file (let's say "L:\test.txt"
> > that is actually "/mnt/samba/test.txt") then I can't open the same file
> > with another dosemu. (It says "Access denied.")
OK, there ARE 2 locking problems. One with a file lock and another with
a record lock. Try to search archives. Try 1.1.3 version, for some
people it seems to work (not for me and for some clipper users i
think). But what do you try with test.txt is maybe ok, when I open for
ex. with NC some file for reading (F3 - view file), it opens the file in
DENY-ALL mode and it should deny other sessions to open the file.
>
> One thing more:
> It does not matter HOW I configure the samba. Even if there is no locking
> whatsoever, I STILL cannot look at file someone else is _reading_.
>
> If anyone knows how, please help.
>
--
Michal Samek <webmaster@tony.cz>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: problems with locking
2002-11-06 13:44 ` Michal Samek
@ 2002-11-06 14:20 ` Siim Vahtre
2002-11-06 14:30 ` Stephen Lee
0 siblings, 1 reply; 10+ messages in thread
From: Siim Vahtre @ 2002-11-06 14:20 UTC (permalink / raw)
Cc: Linux-MSDOS Mailing list
> OK, there ARE 2 locking problems. One with a file lock and another with
> a record lock. Try to search archives. Try 1.1.3 version, for some
> people it seems to work (not for me and for some clipper users i
> think). But what do you try with test.txt is maybe ok, when I open for
> ex. with NC some file for reading (F3 - view file), it opens the file in
> DENY-ALL mode and it should deny other sessions to open the file.
I tried 1.1.3 aswell. Exactly the same :(
I also tried to change the os on it. (drdos and various versions of
freedos). No luck whatsoever.
Whatever I do, "DENY_NONE" and "Oplock:" none is unreadable by others.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: problems with locking
2002-11-06 14:20 ` Siim Vahtre
@ 2002-11-06 14:30 ` Stephen Lee
2002-11-06 14:54 ` Siim Vahtre
0 siblings, 1 reply; 10+ messages in thread
From: Stephen Lee @ 2002-11-06 14:30 UTC (permalink / raw)
To: Siim Vahtre; +Cc: Linux-MSDOS Mailing list
On Wed, 2002-11-06 at 06:20, Siim Vahtre wrote:
> > OK, there ARE 2 locking problems. One with a file lock and another with
> > a record lock. Try to search archives. Try 1.1.3 version, for some
> > people it seems to work (not for me and for some clipper users i
> > think). But what do you try with test.txt is maybe ok, when I open for
> > ex. with NC some file for reading (F3 - view file), it opens the file in
> > DENY-ALL mode and it should deny other sessions to open the file.
>
> I tried 1.1.3 aswell. Exactly the same :(
>
Try it with the latest patches (1.1.3.7) at
http://www.dosemu.org/testing. I had to use the patches, starting with
1.1.3.3, before Foxpro and Samba would recognize each others locks.
Stephen
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: problems with locking
2002-11-06 14:30 ` Stephen Lee
@ 2002-11-06 14:54 ` Siim Vahtre
2002-11-06 17:01 ` Siim Vahtre
0 siblings, 1 reply; 10+ messages in thread
From: Siim Vahtre @ 2002-11-06 14:54 UTC (permalink / raw)
To: linux-msdos
> Try it with the latest patches (1.1.3.7) at
It works!
I now just hope that this testing version is 'stable' enough.
Thank you!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: problems with locking
2002-11-06 14:54 ` Siim Vahtre
@ 2002-11-06 17:01 ` Siim Vahtre
2002-11-06 20:58 ` dosemu locking capabilities Siim Vahtre
0 siblings, 1 reply; 10+ messages in thread
From: Siim Vahtre @ 2002-11-06 17:01 UTC (permalink / raw)
To: linux-msdos
> > Try it with the latest patches (1.1.3.7) at
>
> It works!
*sigh*
It doesn't work :)
The samba has shared everything well. Windows clients get done their
locking correctly. However, when dosemu clients come, they don't care
about locking any more. Even if they are exclusive locks that should
forbid even reading. All the locks are downgraded to DENY_NONE and
everything can always be readed/writed. Alas.
I even tried strict locking aso... nothing worked.
^ permalink raw reply [flat|nested] 10+ messages in thread
* dosemu locking capabilities
2002-11-06 17:01 ` Siim Vahtre
@ 2002-11-06 20:58 ` Siim Vahtre
2002-11-06 21:13 ` Stephen Lee
2002-11-06 21:21 ` Bart Oldeman
0 siblings, 2 replies; 10+ messages in thread
From: Siim Vahtre @ 2002-11-06 20:58 UTC (permalink / raw)
To: linux-msdos
How much ways dosemu actually knows to lock one file?
As I mentioned already, I need quite special way of locking files (paradox
databases). It must be able to lock one certain record, that is being
changed, and leave every other record readable/writeable.
Can dosemu handle it in any way?
(I'm not sure even if DOS can...)
Atm, I have tried thousands of different ways to do it (many different
versions of samba, dosemu, freedos/drdos, etc) but I have not been able
to (even not for once) get different locking than just this simple
"OpLocks: none" and "DenyMode: DENY_NONE", which basicly is quite
'nothing' for me. (It doesn't forbid anyone to corrupt the data.)
Am I doing something totally wrong or isn't it really possible to be able
to lock files in more complex way? (The Windows boxes using the same
samba fileserver locked correctly, so it must be dosemu's problem, right?)
I'm really sorry if I'm just wasting your time with stupid questions but
all those long hours with 'gain: zero' are getting depressing ;-)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: dosemu locking capabilities
2002-11-06 20:58 ` dosemu locking capabilities Siim Vahtre
@ 2002-11-06 21:13 ` Stephen Lee
2002-11-06 21:21 ` Bart Oldeman
1 sibling, 0 replies; 10+ messages in thread
From: Stephen Lee @ 2002-11-06 21:13 UTC (permalink / raw)
To: dosemu
On Wed, 2002-11-06 at 12:58, Siim Vahtre wrote:
>
> How much ways dosemu actually knows to lock one file?
>
> As I mentioned already, I need quite special way of locking files (paradox
> databases). It must be able to lock one certain record, that is being
> changed, and leave every other record readable/writeable.
>
> Can dosemu handle it in any way?
> (I'm not sure even if DOS can...)
>
> Atm, I have tried thousands of different ways to do it (many different
> versions of samba, dosemu, freedos/drdos, etc) but I have not been able
> to (even not for once) get different locking than just this simple
> "OpLocks: none" and "DenyMode: DENY_NONE", which basicly is quite
> 'nothing' for me. (It doesn't forbid anyone to corrupt the data.)
>
> Am I doing something totally wrong or isn't it really possible to be able
> to lock files in more complex way? (The Windows boxes using the same
> samba fileserver locked correctly, so it must be dosemu's problem, right?)
>
> I'm really sorry if I'm just wasting your time with stupid questions but
> all those long hours with 'gain: zero' are getting depressing ;-)
Hang in there ;-) I use Foxpro so the locking requirements look to be
different than for Clipper. Hopefully the developers can chime in and
ask for some diagnostic output.
Stephen
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: dosemu locking capabilities
2002-11-06 20:58 ` dosemu locking capabilities Siim Vahtre
2002-11-06 21:13 ` Stephen Lee
@ 2002-11-06 21:21 ` Bart Oldeman
1 sibling, 0 replies; 10+ messages in thread
From: Bart Oldeman @ 2002-11-06 21:21 UTC (permalink / raw)
To: Siim Vahtre; +Cc: linux-msdos
On Wed, 6 Nov 2002, Siim Vahtre wrote:
> How much ways dosemu actually knows to lock one file?
just a few days ago I wrote down the way how DOSEMU handles file locking
now (since 1.1.3.3) here:
http://marc.theaimsgroup.com/?l=linux-msdos&m=103627393213889&w=2
see src/dosext/mfs/mfs.c for the implementation.
There is a fundamental problem in that DOS locking is incompatible with
UNIX locking. Now if you use smbfs and samba you add two extra layers
where things can go wrong. This makes it complex. If the file server is
not running Windows then it's probably better to use NFS instead.
The locking mechanism I did not mention was region locking, which however
can probably be solved now in certain cases by using the 64-bit
lock functions. See
http://marc.theaimsgroup.com/?l=linux-msdos&m=103626684509236&w=2
(this is not implemented yet; patches are welcome :)
Bart
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2002-11-06 21:21 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-06 10:59 problems with locking Siim Vahtre
2002-11-06 11:55 ` Siim Vahtre
2002-11-06 13:44 ` Michal Samek
2002-11-06 14:20 ` Siim Vahtre
2002-11-06 14:30 ` Stephen Lee
2002-11-06 14:54 ` Siim Vahtre
2002-11-06 17:01 ` Siim Vahtre
2002-11-06 20:58 ` dosemu locking capabilities Siim Vahtre
2002-11-06 21:13 ` Stephen Lee
2002-11-06 21:21 ` Bart Oldeman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox