Bug 12112

Summary: Files with size more >2GB was truncated after copy by ncpfs
Product: File System Reporter: Stanislav German-Evtushenko (ginermail)
Component: OtherAssignee: fs_other
Status: RESOLVED OBSOLETE    
Severity: high CC: alan, marcel.cox
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.27 Subsystem:
Regression: No Bisected commit-id:

Description Stanislav German-Evtushenko 2008-11-27 09:12:29 UTC
Latest working kernel version: none
Earliest failing kernel version: any
Distribution: Ubuntu/SuSE
Hardware Environment: any
Software Environment: any
Problem Description: I can't copy files more then 2Gb by ncpfs. They are trancate.

Steps to reproduce: Copy files from Netware/SuSE server to Ubuntu/SuSE desktop by ncpfs.
Comment 1 Anonymous Emailer 2008-11-27 09:55:09 UTC
Reply-To: akpm@linux-foundation.org


(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Thu, 27 Nov 2008 09:12:29 -0800 (PST) bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=12112
> 
>            Summary: Files with size more >2GB was truncated after copy by
>                     ncpfs
>            Product: File System
>            Version: 2.5
>      KernelVersion: 2.6.27
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: high
>           Priority: P1
>          Component: Other
>         AssignedTo: fs_other@kernel-bugs.osdl.org
>         ReportedBy: ginermail@gmail.com
> 
> 
> Latest working kernel version: none
> Earliest failing kernel version: any
> Distribution: Ubuntu/SuSE
> Hardware Environment: any
> Software Environment: any
> Problem Description: I can't copy files more then 2Gb by ncpfs. They are
> trancate.
> 
> Steps to reproduce: Copy files from Netware/SuSE server to Ubuntu/SuSE
> desktop
> by ncpfs.
> 
Comment 2 Petr Vandrovec 2008-11-28 21:59:07 UTC
Andrew Morton wrote:
> (switched to email.  Please respond via emailed reply-to-all, not via the
> bugzilla web interface).
> 
> On Thu, 27 Nov 2008 09:12:29 -0800 (PST) bugme-daemon@bugzilla.kernel.org
> wrote:
> 
>> http://bugzilla.kernel.org/show_bug.cgi?id=12112
>>
>>            Summary: Files with size more >2GB was truncated after copy by
>>                     ncpfs
>>            Product: File System
>>            Version: 2.5
>>      KernelVersion: 2.6.27
>>           Platform: All
>>         OS/Version: Linux
>>               Tree: Mainline
>>             Status: NEW
>>           Severity: high
>>           Priority: P1
>>          Component: Other
>>         AssignedTo: fs_other@kernel-bugs.osdl.org
>>         ReportedBy: ginermail@gmail.com
>>
>>
>> Latest working kernel version: none
>> Earliest failing kernel version: any
>> Distribution: Ubuntu/SuSE
>> Hardware Environment: any
>> Software Environment: any
>> Problem Description: I can't copy files more then 2Gb by ncpfs. They are
>> trancate.
>>
>> Steps to reproduce: Copy files from Netware/SuSE server to Ubuntu/SuSE
>> desktop
>> by ncpfs.

ncpfs does not support files bigger than 4GB.  If you get truncated 
files, I guess that your app is at fault, it should get SIGXFSZ or an 
error when you go over 4GB boundary:

(from fs/ncpfs/inode.c)

         sb->s_flags |= MS_NODIRATIME;   /* probably even noatime */
         sb->s_maxbytes = 0xFFFFFFFFU;
         sb->s_blocksize = 1024; /* Eh...  Is this correct? */

								Petr
Comment 3 Stanislav German-Evtushenko 2008-11-28 22:49:55 UTC
I tried command 'cp' to copy and I got same result. 'cp' works normal on local filesystem (ext3).
Comment 4 Stanislav German-Evtushenko 2008-11-28 22:53:43 UTC
Not 4Gb, but exactly 2Gb.
Comment 5 Marcel Cox 2009-02-08 02:07:51 UTC
Independently on whether the limit is 2GB or 4GB, the core of the problem is that ncpfs is about 10 years behind on NCP protocol support. Like many other network protocols, NCP has been evolving all the time and new features were added. The 2 most essential features missing in ncpfs and that always cause problems for Linux machines that connect to NetWare servers are:
- support for files >4GB
- utf8 support

Other missing features are for example:

- support for SLP as name resolution protocol to locate NCP servers
- support for NMAS to login to allow using universal password for login

What a lot of people may not know is that the documentation for the NCP protocol is public and available here:

http://developer.novell.com/documentation/ncp/ncp__enu/data/bktitle.html