[patch] smbfs does not support LFS (2.4.1-ac18)

From: Urban Widmark (urban@teststation.com)
Date: Sun Feb 18 2001 - 09:13:30 EST


Unless I misunderstand s_maxbytes it says how large a file can be on the
fs. I assume it is enough for a fs to set that and then it knows the vfs
will not ask it to go beyond that limit?

Is it ok to at mount time set it to non-LFS and then later change it to be
something larger? smbfs doesn't actually know what the server and smbmount
negotiates until later, but no smbfs operation can take place before that

For smbfs the limit is currently 2G, it does unsigned -> signed internally
and it lacks support from smbmount. The later makes the server (tested vs
NT4sp6) return errors beyond 2G.

Quick patch below to keep it within limits.

For people needing LFS in smbfs I have a *very* experimental pair of
patches here:
(It worked last night, it may still work today. You need to patch both the
 kernel and samba ./configure)


diff -ur -X exclude linux-2.4.1-ac18-orig/fs/smbfs/inode.c linux-2.4.1-ac18-smbfs/fs/smbfs/inode.c
--- linux-2.4.1-ac18-orig/fs/smbfs/inode.c Sun Feb 18 01:20:31 2001
+++ linux-2.4.1-ac18-smbfs/fs/smbfs/inode.c Sun Feb 18 14:06:15 2001
@@ -399,7 +399,7 @@
         sb->s_magic = SMB_SUPER_MAGIC;
         sb->s_flags = 0;
         sb->s_op = &smb_sops;
- sb->s_maxbytes = ~0; /* Server limited not client */
+ sb->s_maxbytes = MAX_NON_LFS; /* client support missing */
         sb->u.smbfs_sb.mnt = NULL;
         sb->u.smbfs_sb.sock_file = NULL;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

This archive was generated by hypermail 2b29 : Fri Feb 23 2001 - 21:00:17 EST