public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
* Slow When accessing Samba Share
@ 2009-06-16 13:42 Andrew Joakimsen
  2009-06-16 16:10 ` Javier Tarifa
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Joakimsen @ 2009-06-16 13:42 UTC (permalink / raw)
  To: dosEmu-list

I have an old DOS application (clipper/blinker) that runs well under
DOSEMU when the files are local. When the Samba share is mounted and I
use lredir for that share it is very slow -- slower than Windows XP
clients that access the same share on the same server.

Furthermore I have a DOS error 5 when I try a function in that program
on a Linux client with the SMB share. If I select retry it works. What
seems to happen is that the program is creating a file and then tries
to read it. I think because access is so slow, the file is not created
until after it tries to access it.

On the server is running dosemu-1.4.0.1 and like I said, it works with
no problems... it runs quicker than on the XP machines. On the client
it is dosemu-1.4.0.0 (which is odd, because I downloaded DOSEMU from
the site only a few days ago and the other one has been running over 6
months)

What can I do to solve this?

Server:

#smb.conf:
[drive_x]
        comment = comment
        inherit acls = Yes
        path = /data/drive_x/
        read only = No
        create mask =666
        guest ok =yes


Client:

#fstab:
//server/drive_x     /mnt/win                cifs
username=linstation01,password=anything,rw      0 0

#autoexec.bat:
lredir x: linux\fs\mnt\win

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

* Re: Slow When accessing Samba Share
  2009-06-16 13:42 Slow When accessing Samba Share Andrew Joakimsen
@ 2009-06-16 16:10 ` Javier Tarifa
  0 siblings, 0 replies; 2+ messages in thread
From: Javier Tarifa @ 2009-06-16 16:10 UTC (permalink / raw)
  To: Andrew Joakimsen; +Cc: dosEmu-list

[-- Attachment #1: Type: text/plain, Size: 2762 bytes --]

I think I had the same problem when accessing a novell netware volume. I 
suppose that your problem is that file opening is very slow.
I tracked the problem to the function scan_dir in the file mfs.c
The problem is that when dosemu needs to open a file, to work around the 
difference between the case sensitiveness between linux
and DOS, the 8.3 filename convention etc etc, it loops through all the 
files in the directory trying to find a match. When it's working
on local it doesn't matter but when you're working with a network 
filesystem like novell netware or windows shares you can see network
traffic maxing out and file opening being pretty slow.

As novell (like samba) does itself name translation (you can access a 
file named testfile.txt as TESTFILE.TXT etc) I worked around the problem
with the patch I attach, you could modify it as you see fit.

Andrew Joakimsen escribió:
> I have an old DOS application (clipper/blinker) that runs well under
> DOSEMU when the files are local. When the Samba share is mounted and I
> use lredir for that share it is very slow -- slower than Windows XP
> clients that access the same share on the same server.
>
> Furthermore I have a DOS error 5 when I try a function in that program
> on a Linux client with the SMB share. If I select retry it works. What
> seems to happen is that the program is creating a file and then tries
> to read it. I think because access is so slow, the file is not created
> until after it tries to access it.
>
> On the server is running dosemu-1.4.0.1 and like I said, it works with
> no problems... it runs quicker than on the XP machines. On the client
> it is dosemu-1.4.0.0 (which is odd, because I downloaded DOSEMU from
> the site only a few days ago and the other one has been running over 6
> months)
>
> What can I do to solve this?
>
> Server:
>
> #smb.conf:
> [drive_x]
>         comment = comment
>         inherit acls = Yes
>         path = /data/drive_x/
>         read only = No
>         create mask =666
>         guest ok =yes
>
>
> Client:
>
> #fstab:
> //server/drive_x     /mnt/win                cifs
> username=linstation01,password=anything,rw      0 0
>
> #autoexec.bat:
> lredir x: linux\fs\mnt\win
> --
> 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
> ------------------------------------------------------------------------
>
>
> Se certificó que el correo entrante no contiene virus.
> Comprobada por AVG - www.avg.es 
> Versión: 8.5.339 / Base de datos de virus: 270.12.73/2180 - Fecha de la versión: 06/16/09 07:41:00
>
>   


[-- Attachment #2: scandir_patch.patch.old --]
[-- Type: text/plain, Size: 630 bytes --]

--- dosemu-1.4.0/src/dosext/mfs/mfs.c.orig	2009-01-29 09:10:16.000000000 +0100
+++ dosemu-1.4.0/src/dosext/mfs/mfs.c	2009-01-29 09:11:15.000000000 +0100
@@ -1788,6 +1788,13 @@
     path = "/";
 
   Debug0((dbg_fd,"scan_dir(%s,%s)\n",path,name));
+  //Si busco en /mnt/novellf/DADES/.., lo daremos como bueno,
+  //si no existe devolvera false igual cuando intente hacer
+  //el stat 
+  //Si busco en cualquier otro sitio, seguiremos normal
+  if( strncmp(path,"/mnt/novellf/DADES/",19) == 0){
+       return(TRUE);
+  }
 
   /* check if name is an LFN or not; if it's 8.3
      then dosname will contain the uppercased name, and

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

end of thread, other threads:[~2009-06-16 16:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-16 13:42 Slow When accessing Samba Share Andrew Joakimsen
2009-06-16 16:10 ` Javier Tarifa

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