public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
From: Javier Tarifa <xavier.tarifa@adbosch.es>
To: Andrew Joakimsen <joakimsen@gmail.com>
Cc: dosEmu-list <linux-msdos@vger.kernel.org>
Subject: Re: Slow When accessing Samba Share
Date: Tue, 16 Jun 2009 18:10:56 +0200	[thread overview]
Message-ID: <4A37C410.9020009@adbosch.es> (raw)
In-Reply-To: <23fd749a0906160642s22faf507i5f9377300012e9e2@mail.gmail.com>

[-- 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

      reply	other threads:[~2009-06-16 16:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-16 13:42 Slow When accessing Samba Share Andrew Joakimsen
2009-06-16 16:10 ` Javier Tarifa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A37C410.9020009@adbosch.es \
    --to=xavier.tarifa@adbosch.es \
    --cc=joakimsen@gmail.com \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox