* Samba / DosEmu And Oplocks !!!!
@ 2002-11-02 18:53 Carlos A Silva
2002-11-02 20:11 ` Przemyslaw Czerpak
0 siblings, 1 reply; 5+ messages in thread
From: Carlos A Silva @ 2002-11-02 18:53 UTC (permalink / raw)
To: linux-msdos
Hi, I have Linux Kernel 2.4.18 , Samba 2.2.3a and DosEmu 1.1.3. I am
running a Clipper aplication under DosEmu and when some users access the
same Clipper aplication via Samba, my db/ntx files are corrupted!!!!...The
locks & unlocks doesn´t work well.
Please, have you resolved this problem in your site ???
Regards,
Carlos A Silva
ciclum@uol.com.br
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Samba / DosEmu And Oplocks !!!!
2002-11-02 18:53 Samba / DosEmu And Oplocks !!!! Carlos A Silva
@ 2002-11-02 20:11 ` Przemyslaw Czerpak
2002-11-02 22:05 ` Bart Oldeman
2002-11-04 9:07 ` Michal Samek
0 siblings, 2 replies; 5+ messages in thread
From: Przemyslaw Czerpak @ 2002-11-02 20:11 UTC (permalink / raw)
To: linux-msdos
On Sat, 02 Nov 2002, Carlos A Silva wrote:
> Hi, I have Linux Kernel 2.4.18 , Samba 2.2.3a and DosEmu 1.1.3. I am
> running a Clipper aplication under DosEmu and when some users access the
> same Clipper aplication via Samba, my db/ntx files are corrupted!!!!...The
> locks & unlocks doesn´t work well.
> Please, have you resolved this problem in your site ???
Clipper can use different lock semantic in each RDD
Some of them use phantom locks (over the size of file)
and over the 2GB limit (DOS has 32bit lock area, POSIX 31 when
you use fcntl on 32bit machine).
The newest Samba use fcntl64 (63 bit lock area) with kernel 2.4
I guess it is the problem. When I last time checked DOSEMU it
used only normal fcntl and cleared the highest bit in lock address.
It has to be changed to avoid such lock problems.
BTW. OPLOCKS is other lock mechanism and should be disabled in samba
or other smb file servers for DOS apps. Usually DOS programs cannot
benefit form OPLOCKS but it's very easy way to corrupt shared data
(OPLOCKS increase the time when new/modified data is stored on client
side and not on the server).
best regards,
Przemek
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Samba / DosEmu And Oplocks !!!!
2002-11-02 20:11 ` Przemyslaw Czerpak
@ 2002-11-02 22:05 ` Bart Oldeman
2002-11-03 2:51 ` Przemyslaw Czerpak
2002-11-04 9:07 ` Michal Samek
1 sibling, 1 reply; 5+ messages in thread
From: Bart Oldeman @ 2002-11-02 22:05 UTC (permalink / raw)
To: linux-msdos; +Cc: Carlos A Silva
On Sat, 2 Nov 2002, Przemyslaw Czerpak wrote:
> The newest Samba use fcntl64 (63 bit lock area) with kernel 2.4
> I guess it is the problem. When I last time checked DOSEMU it
> used only normal fcntl and cleared the highest bit in lock address.
> It has to be changed to avoid such lock problems.
This could well be the case, thanks. The fundamental problem seems to be
that file offsets in DOS are unsigned 32-bit whereas in Unix they are
signed (off_t/loff_t).
Right now, for LOCK_FILE_REGION (as opposed to the locking bits used when
opening a file), for the struct flock larg, larg.l_len is masked with
~0xc0000000 so even the *two* highest bits are cleared.
For l_start, the top two bits are shifted like this:
0xc0000020 becomes 0x3000020.
because " /* the offset is often strange - remove 2 of its bits if either of
the top two bits are set. Shift the top ones by two bits. This
still allows OLE2 apps to operate, but should stop lockd from
dieing */ "
it means though that if the relevant file is greater than 256 MB things
can go horribly wrong.
Now with fcntl64 we can probably avoid this wizardry but will probably
also need to use open64 instead of open and check the kernel version at
runtime?
$ man fcntl64
No manual entry for fcntl64
Hmm :(
Bart
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Samba / DosEmu And Oplocks !!!!
2002-11-02 20:11 ` Przemyslaw Czerpak
2002-11-02 22:05 ` Bart Oldeman
@ 2002-11-04 9:07 ` Michal Samek
1 sibling, 0 replies; 5+ messages in thread
From: Michal Samek @ 2002-11-04 9:07 UTC (permalink / raw)
To: Przemyslaw Czerpak; +Cc: Linux-MSDOS Mailing list
On So, 2002-11-02 at 21:11, Przemyslaw Czerpak wrote:
> Clipper can use different lock semantic in each RDD
Can you tell me more about sixdriver's DBFNSX / SIXNSX if you know? Can
be this RDD lock-safe and what setup/versions/features (if you know) it
needs to behaviour correctly (samba, kernel, etc.)?
Thanks
--
Michal Samek <webmaster@tony.cz>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-11-04 9:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-02 18:53 Samba / DosEmu And Oplocks !!!! Carlos A Silva
2002-11-02 20:11 ` Przemyslaw Czerpak
2002-11-02 22:05 ` Bart Oldeman
2002-11-03 2:51 ` Przemyslaw Czerpak
2002-11-04 9:07 ` Michal Samek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox