david@connol.ly

CIFS Module for Nokia 770

I have released a package containing the linux kernel’s CIFS module. The CIFS module allows accessing Windows & Samba file shares.

Performance is good while copying files. However it isn’t fast enough to stream .mp3 files without skipping so my in-house icecast won’t be retired anytime soon!!

The module has been built with a patch from git:

commit id 0753ca7bc2b876dd136e9db11a20f85cbe4e08b1

[CIFS] Change pragma pack(1) to attribute(packed) to allow cifs on arm to access unaligned structures coming in off the wire

The package is available here. It is best used with mount-cifs available here.

Example Usage (requires root):

mkdir /home/user/MyDocs/.documents/Windows

insmod /var/lib/install/lib/modules/2.6.12.3/cifs.ko

mount.cifs \\\\WINDOWS_PC_IPADDRESS\\SHARE_NAME /home/user/MyDocs/.documents/Windows -o guest

Build instructions:

N.B. You don’t have to flash your Nokia 770 with a new kernel for this module.

Comments:

Left by fanoush at Tue, 2 May 9:14 PM

Hi, great work, thanks for the patched cifs module. I tried it before too but got error since the version in kernel was buggy. Did you also try smbfs/smbmount if it is faster or better deals with buffering? As for ‘streaming’ I suppose it is fast but the video and audio player does no buffering for ’local’ files. I wonder if the kernel itself on fs level or cifs or smbfs can be forced to do some buffering/readahead for opened files. That could help with ‘streaming’ audio from windows share.
Left by Jussi Kukkonen at Wed, 3 May 9:11 PM

Hey, it works like charm! Great work David.

I’m seeing the same unbuffered read -problem though.
Left by David Connolly at Mon, 8 May 7:05 PM

Hi,
Thank you both :)

I haven’t tried SMBFS/smbmount because I read somewhere that it is slower, although I can’t find the link now. I might investigate it soon.

In the meantime I’ve found options that allow smooth music playback (Haven’t tested Video yet!).

Although it can’t take simultaneous access (e.g. File Dialog) to the mount, so prepare you playlists in advance.

Try it with the following:
insmod /var/lib/install/lib/modules/2.6.12.3/cifs.ko CIFSMaxBufSize=65536
mount.cifs \\\\WINDOWS_PC_IPADDRESS\\SHARE_NAME /home/user/MyDocs/.documents/Windows -o guest,directio,rsize=32768

Cheers,
-David
Left by David Connolly at Mon, 8 May 7:09 PM

Found a link that confirms with informal tests that smbfs is slower than cifs (at least with directio!).

http://lists.samba.org/archive/linux-cifs-client/2004-December/000604.html

Cheers,
-David

#maemo