readbraw vs. readX

axs at zurich.ibm.com axs at zurich.ibm.com
Thu Oct 8 16:33:48 GMT 1998



Using Samba 1.9.18p10 I have found a difference between Win95 and WinNT:
opening 'Lotus Freelance' files from Win95 is really slow (about 17 kB/s
only) vs fast (~hundreds of kB/s) from WinNT.

Looking into the log (with debug level=4) I see using Win95:

switch message SMBopenX (pid 33994)
Skipping become_user - already user
unix_clean_name [./PRIVATE/Goyal_Sep98.PRZ]
Got dir cache hit on . PRIVATE -> Private
unix_clean_name [Private/Goyal_Sep98.PRZ]
calling open_file with flags=0x2 flags2=0x0 mode=0664
Allocated new file_fd_struct 0, dev = ffffffff, inode = ffffffff
1998/10/08 13:50:32 axs opened file Private/Goyal_Sep98.PRZ read=Yes
write=Yes (numopen=1 fnum=26)
set_share_mode: Created share record for Private/Goyal_Sep98.PRZ (dev 1
inode 33106898)
set_share_mode: Created share entry for Private/Goyal_Sep98.PRZ with mode
0x22 pid=33994
1998/10/08 13:50:32 Transaction 18 of length 94
switch message SMBopenX (pid 33994)
Skipping become_user - already user
unix_clean_name [./PRIVATE/Goyal_Sep98.PRZ]
Got dir cache hit on . PRIVATE -> Private
unix_clean_name [Private/Goyal_Sep98.PRZ]
1998/10/08 13:50:32 oplock_break: called for dev = 1, inode = 1f92bd2.
Current global_oplocks_open = 1
chdir to /var/zurich/etc/samba
1998/10/08 13:50:32 Transaction 18 of length 55
switch message SMBlockingX (pid 33994)
chdir to /u/axs
Skipping become_user - already user
chdir to /afs/zurich.ibm.com/u/axs
1998/10/08 13:50:32 oplock_break: returning success for fnum = 26, dev = 1,
inode = 1f92bd2. Current global_oplocks_open = 0
Share violation on file (2,2,2,33994,Private/Goyal_Sep98.PRZ,fcbopen = 0,
flags = 0) = 0
1998/10/08 13:50:32 error packet at line 1391 cmd=45 (SMBopenX) eclass=1
ecode=32
error string = Permission denied
1998/10/08 13:50:33 Transaction 20 of length 55
switch message SMBreadbraw (pid 33994)
Skipping become_user - already user
chdir to /u/axs
1998/10/08 13:50:33 readbraw fnum=26 cnum=75 start=4825088 max=4096 min=0
nread=4096
transfer_file 0  (head=4100) called
1998/10/08 13:50:33 Transaction 21 of length 55
switch message SMBreadbraw (pid 33994)
Skipping become_user - already user
1998/10/08 13:50:33 readbraw fnum=26 cnum=75 start=4829184 max=4096 min=0
nread=4096
transfer_file 0  (head=4100) called
1998/10/08 13:50:33 Transaction 22 of length 55
switch message SMBreadbraw (pid 33994)
Skipping become_user - already user
1998/10/08 13:50:33 readbraw fnum=26 cnum=75 start=4833280 max=4096 min=0
nread=4096
transfer_file 0  (head=4100) called
1998/10/08 13:50:34 Transaction 23 of length 55
switch message SMBreadbraw (pid 33994)
Skipping become_user - already user
...

so it is using 'readbraw' to get the file to the client.

Using WinNT it looks like:

switch message SMBopenX (pid 32280)
Skipping become_user - already user
unix_clean_name [./axs/Private/Goyal_Sep98.PRZ]
unix_clean_name [axs/Private/Goyal_Sep98.PRZ]
calling open_file with flags=0x2 flags2=0x0 mode=0664
Allocated new file_fd_struct 0, dev = ffffffff, inode = ffffffff
1998/10/08 14:41:00 mir opened file axs/Private/Goyal_Sep98.PRZ read=Yes
write=Yes (numopen=1 fnum=91)
set_share_mode: Created share record for axs/Private/Goyal_Sep98.PRZ (dev 1
inode 33106898)
set_share_mode: Created share entry for axs/Private/Goyal_Sep98.PRZ with
mode 0x22 pid=32280
1998/10/08 14:41:00 Transaction 1542 of length 64
switch message SMBreadX (pid 32280)
Skipping become_user - already user
1998/10/08 14:41:00 readX fnum=91 cnum=119 min=4096 max=4096 nread=4096
1998/10/08 14:41:01 Transaction 1543 of length 64
switch message SMBreadX (pid 32280)
Skipping become_user - already user
1998/10/08 14:41:01 readX fnum=91 cnum=119 min=4096 max=4096 nread=4096
1998/10/08 14:41:01 Transaction 1544 of length 64
switch message SMBreadX (pid 32280)
Skipping become_user - already user
1998/10/08 14:41:01 readX fnum=91 cnum=119 min=32768 max=32768 nread=32768
1998/10/08 14:41:01 Transaction 1545 of length 64
switch message SMBreadX (pid 32280)
Skipping become_user - already user
1998/10/08 14:41:01 readX fnum=91 cnum=119 min=4096 max=4096 nread=4096
1998/10/08 14:41:01 Transaction 1546 of length 64
switch message SMBreadX (pid 32280)
Skipping become_user - already user
1998/10/08 14:41:01 readX fnum=91 cnum=119 min=4096 max=4096 nread=4096
1998/10/08 14:41:01 Transaction 1547 of length 64
...

so it is using 'readX' for the file transfer.
In both cases the client opens the file into 'Lotus Freelance 97'.

Why is it using 'readbraw' vs. 'readX'? Any help appreciated!

Axel
_______________________________________________________________

  Axel Tanner
  IBM Zurich Research Laboratory    email: axs at zurich.ibm.com
  Saumerstr. 4                      phone:    +41/1/724 82 49
  CH-8803 Rueschlikon               fax  :    +41/1/724 89 59
  Switzerland                  http://www.zurich.ibm.com/~axs
_______________________________________________________________




More information about the samba mailing list