public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
* How to change Dosemu files lock scheme?
@ 2004-03-18 19:56  Flávio Eler de Melo
  2004-03-18 23:54 ` Bart Oldeman
  2004-03-19  7:17 ` Reinhard Karcher
  0 siblings, 2 replies; 6+ messages in thread
From:  Flávio Eler de Melo @ 2004-03-18 19:56 UTC (permalink / raw)
  To: linux-msdos; +Cc: jefferson

Anyone has an idea of where in Dosemu sources I can find the section 
concerning files lock scheme? 

I´ve got a trouble with files lock scheme in Dosemu. I have a Clipper 
database served by a Slackware NFS server. When I access this database from 
two different remote clients running a Clipper application under FreeDos 
with Dosemu, a certain record inserted in the database by one client is 
overwritten by another record inserted by the other one. 
I figured out by means of a friend advice that this is a problem of the file 
lock scheme, namely: the Dosemu file lock process is based upon an Heuristic 
method so that one Clipper Application client running under an instance of 
Dosemu does not detects that another Dosemu is already locking a file via 
LAN for recording some data. 

Thank you very much 

Flávio 

_________________________________________________________
Voce quer um iGMail protegido contra vírus e spams? 
Clique aqui: http://www.igmailseguro.ig.com.br
Ofertas imperdíveis! Link: http://www.americanas.com.br/ig/


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

* Re: How to change Dosemu files lock scheme?
  2004-03-18 19:56 How to change Dosemu files lock scheme?  Flávio Eler de Melo
@ 2004-03-18 23:54 ` Bart Oldeman
  2004-03-19 12:31   ` Anderson Pereira Ataides
  2004-03-20 16:26   ` How to change Dosemu files lock scheme? Witold Filipczyk
  2004-03-19  7:17 ` Reinhard Karcher
  1 sibling, 2 replies; 6+ messages in thread
From: Bart Oldeman @ 2004-03-18 23:54 UTC (permalink / raw)
  To:  Flávio Eler de Melo; +Cc: linux-msdos, jefferson

On Thu, 18 Mar 2004,  Flávio Eler de Melo wrote:

> Anyone has an idea of where in Dosemu sources I can find the section
> concerning files lock scheme?

mfs.c, in src/dosext/mfs, lock_file_region() and share().

Problem is that DOS has 5 lock types whereas Linux only has 2 -- that's
why we have to use heuristics.

Samba can on the other hand adminstrate all client accesses because it's a
server but a dosemu file server (serving all dosemus) does not exist
simply because it's never been an itch to really scratch for the
developers (I tried to improve a bit for 1.2.0 fixing things that were
even problematic with just one dosemu running, but gave up after a while).

You can see how files are locked using lsof.

Bart

-
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] 6+ messages in thread

* Re: How to change Dosemu files lock scheme?
  2004-03-18 19:56 How to change Dosemu files lock scheme?  Flávio Eler de Melo
  2004-03-18 23:54 ` Bart Oldeman
@ 2004-03-19  7:17 ` Reinhard Karcher
  1 sibling, 0 replies; 6+ messages in thread
From: Reinhard Karcher @ 2004-03-19  7:17 UTC (permalink / raw)
  To: linux-msdos

On Thu, Mar 18, 2004 at 04:56:42PM -0300,  Flávio Eler de Melo wrote
> Anyone has an idea of where in Dosemu sources I can find the section 
> concerning files lock scheme? 
> 
> I?ve got a trouble with files lock scheme in Dosemu. I have a Clipper 
> database served by a Slackware NFS server. When I access this database from 
> two different remote clients running a Clipper application under FreeDos 
> with Dosemu, a certain record inserted in the database by one client is 
> overwritten by another record inserted by the other one. 
> I figured out by means of a friend advice that this is a problem of the file 
> lock scheme, namely: the Dosemu file lock process is based upon an Heuristic 
> method so that one Clipper Application client running under an instance of 
> Dosemu does not detects that another Dosemu is already locking a file via 
> LAN for recording some data. 
>

Which NFS-version do you use? You need at least nfsV3 for locking.

Reinhard

-
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] 6+ messages in thread

* Re: How to change Dosemu files lock scheme?
  2004-03-18 23:54 ` Bart Oldeman
@ 2004-03-19 12:31   ` Anderson Pereira Ataides
  2004-03-20 17:07     ` How to change Dosemu files lock scheme? !!!!!quick fix!!!!! Kevin Noseworthy - Specialty Software
  2004-03-20 16:26   ` How to change Dosemu files lock scheme? Witold Filipczyk
  1 sibling, 1 reply; 6+ messages in thread
From: Anderson Pereira Ataides @ 2004-03-19 12:31 UTC (permalink / raw)
  To: linux-msdos

Flavio,

I told you in a reply to your personal email. Now listening from dosemu 
mantainers do you believe?

You could try a Clipper-like language for Linux like FlagShip, but if you read 
the documentation it says something like this: "do not mix windows and Linux 
workstations acessing the same files. Due to filesystem differences it may 
corrupt your database files". So problem is not only with dosemu.

The "perfect" solution is: use a database like MySQL, and make your 
application access the database, not the filesystem.

[]s
Anderson Pereira Ataides



Em Qui 18 Mar 2004 20:54, Bart Oldeman escreveu:
> On Thu, 18 Mar 2004,  Flávio Eler de Melo wrote:
> > Anyone has an idea of where in Dosemu sources I can find the section
> > concerning files lock scheme?
>
> mfs.c, in src/dosext/mfs, lock_file_region() and share().
>
> Problem is that DOS has 5 lock types whereas Linux only has 2 -- that's
> why we have to use heuristics.
>
> Samba can on the other hand adminstrate all client accesses because it's a
> server but a dosemu file server (serving all dosemus) does not exist
> simply because it's never been an itch to really scratch for the
> developers (I tried to improve a bit for 1.2.0 fixing things that were
> even problematic with just one dosemu running, but gave up after a while).
>
> You can see how files are locked using lsof.
>
> Bart
>
> -
> 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

-
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] 6+ messages in thread

* Re: How to change Dosemu files lock scheme?
  2004-03-18 23:54 ` Bart Oldeman
  2004-03-19 12:31   ` Anderson Pereira Ataides
@ 2004-03-20 16:26   ` Witold Filipczyk
  1 sibling, 0 replies; 6+ messages in thread
From: Witold Filipczyk @ 2004-03-20 16:26 UTC (permalink / raw)
  To: bartoldeman; +Cc: Flávio Eler de Melo, linux-msdos, jefferson

On Fri, Mar 19, 2004 at 01:02:32AM +0000, Bart Oldeman wrote:
> On Thu, 18 Mar 2004,  Flávio Eler de Melo wrote:
> 
> > Anyone has an idea of where in Dosemu sources I can find the section
> > concerning files lock scheme?
> 
> mfs.c, in src/dosext/mfs, lock_file_region() and share().
> 
> Problem is that DOS has 5 lock types whereas Linux only has 2 -- that's
> why we have to use heuristics.
> 
> Samba can on the other hand adminstrate all client accesses because it's a
> server but a dosemu file server (serving all dosemus) does not exist
> simply because it's never been an itch to really scratch for the
> developers (I tried to improve a bit for 1.2.0 fixing things that were
> even problematic with just one dosemu running, but gave up after a while).

Why not implement locking using temporary files.
Eg. lock(file) == create file.lockfile with info about type of lock inside
a file. 

-- 
Witold Filipczyk tohu-bohu
<witekfl@poczta.gazeta.pl>
-
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] 6+ messages in thread

* Re: How to change Dosemu files lock scheme?     !!!!!quick fix!!!!!
  2004-03-19 12:31   ` Anderson Pereira Ataides
@ 2004-03-20 17:07     ` Kevin Noseworthy - Specialty Software
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Noseworthy - Specialty Software @ 2004-03-20 17:07 UTC (permalink / raw)
  To: Anderson Pereira Ataides, linux-msdos@vger.kernel.org,
	Flávio Eler de Melo, Reinhard Karcher, Vedran Vucic,
	Bart Oldeman

Setup a Novell server to hold the files
Dosemu supports Novell
I have this working with full file and record locking
using my dos database - Advanced Revelation -  i.e. Pick for DOS
Don't know a lot about xBase databases except how to suck the data out 
of them.
If clipper supports novell your off to the races.


Anderson Pereira Ataides wrote:

>Flavio,
>
>I told you in a reply to your personal email. Now listening from dosemu 
>mantainers do you believe?
>
>You could try a Clipper-like language for Linux like FlagShip, but if you read 
>the documentation it says something like this: "do not mix windows and Linux 
>workstations acessing the same files. Due to filesystem differences it may 
>corrupt your database files". So problem is not only with dosemu.
>
>The "perfect" solution is: use a database like MySQL, and make your 
>application access the database, not the filesystem.
>
>[]s
>Anderson Pereira Ataides
>
>
>
>Em Qui 18 Mar 2004 20:54, Bart Oldeman escreveu:
>  
>
>>On Thu, 18 Mar 2004,  Flávio Eler de Melo wrote:
>>    
>>
>>>Anyone has an idea of where in Dosemu sources I can find the section
>>>concerning files lock scheme?
>>>      
>>>
>>mfs.c, in src/dosext/mfs, lock_file_region() and share().
>>
>>Problem is that DOS has 5 lock types whereas Linux only has 2 -- that's
>>why we have to use heuristics.
>>
>>Samba can on the other hand adminstrate all client accesses because it's a
>>server but a dosemu file server (serving all dosemus) does not exist
>>simply because it's never been an itch to really scratch for the
>>developers (I tried to improve a bit for 1.2.0 fixing things that were
>>even problematic with just one dosemu running, but gave up after a while).
>>
>>You can see how files are locked using lsof.
>>
>>Bart
>>
>>-
>>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
>>    
>>
>
>-
>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
>
>  
>


-
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] 6+ messages in thread

end of thread, other threads:[~2004-03-20 17:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-18 19:56 How to change Dosemu files lock scheme?  Flávio Eler de Melo
2004-03-18 23:54 ` Bart Oldeman
2004-03-19 12:31   ` Anderson Pereira Ataides
2004-03-20 17:07     ` How to change Dosemu files lock scheme? !!!!!quick fix!!!!! Kevin Noseworthy - Specialty Software
2004-03-20 16:26   ` How to change Dosemu files lock scheme? Witold Filipczyk
2004-03-19  7:17 ` Reinhard Karcher

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