aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2007-06-24 14:30:48 -0400
committerSteve French <sfrench@us.ibm.com>2007-06-24 14:30:48 -0400
commit75865f8cc8b38c30c3923b74de4b29a00cc4c0e4 (patch)
treeec4c6322e739362f4b666fbe0fccbb14c4baaaa7 /fs/cifs/connect.c
parent75154f402ef18e459ff97ddece25656b6c2b329c (diff)
[CIFS] Add in some missing flags and cifs README and TODO corrections
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c53
1 files changed, 37 insertions, 16 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index f4e92661b223..4a2af78083fb 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * fs/cifs/connect.c 2 * fs/cifs/connect.c
3 * 3 *
4 * Copyright (C) International Business Machines Corp., 2002,2006 4 * Copyright (C) International Business Machines Corp., 2002,2007
5 * Author(s): Steve French (sfrench@us.ibm.com) 5 * Author(s): Steve French (sfrench@us.ibm.com)
6 * 6 *
7 * This library is free software; you can redistribute it and/or modify 7 * This library is free software; you can redistribute it and/or modify
@@ -1650,19 +1650,19 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo * tcon,
1650 } 1650 }
1651 1651
1652 cap &= CIFS_UNIX_CAP_MASK; 1652 cap &= CIFS_UNIX_CAP_MASK;
1653 if(vol_info && vol_info->no_psx_acl) 1653 if (vol_info && vol_info->no_psx_acl)
1654 cap &= ~CIFS_UNIX_POSIX_ACL_CAP; 1654 cap &= ~CIFS_UNIX_POSIX_ACL_CAP;
1655 else if(CIFS_UNIX_POSIX_ACL_CAP & cap) { 1655 else if (CIFS_UNIX_POSIX_ACL_CAP & cap) {
1656 cFYI(1,("negotiated posix acl support")); 1656 cFYI(1,("negotiated posix acl support"));
1657 if(sb) 1657 if(sb)
1658 sb->s_flags |= MS_POSIXACL; 1658 sb->s_flags |= MS_POSIXACL;
1659 } 1659 }
1660 1660
1661 if(vol_info && vol_info->posix_paths == 0) 1661 if (vol_info && vol_info->posix_paths == 0)
1662 cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP; 1662 cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP;
1663 else if(cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) { 1663 else if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) {
1664 cFYI(1,("negotiate posix pathnames")); 1664 cFYI(1,("negotiate posix pathnames"));
1665 if(sb) 1665 if (sb)
1666 CIFS_SB(sb)->mnt_cifs_flags |= 1666 CIFS_SB(sb)->mnt_cifs_flags |=
1667 CIFS_MOUNT_POSIX_PATHS; 1667 CIFS_MOUNT_POSIX_PATHS;
1668 } 1668 }
@@ -1670,21 +1670,35 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo * tcon,
1670 /* We might be setting the path sep back to a different 1670 /* We might be setting the path sep back to a different
1671 form if we are reconnecting and the server switched its 1671 form if we are reconnecting and the server switched its
1672 posix path capability for this share */ 1672 posix path capability for this share */
1673 if(sb && (CIFS_SB(sb)->prepathlen > 0)) 1673 if (sb && (CIFS_SB(sb)->prepathlen > 0))
1674 CIFS_SB(sb)->prepath[0] = CIFS_DIR_SEP(CIFS_SB(sb)); 1674 CIFS_SB(sb)->prepath[0] = CIFS_DIR_SEP(CIFS_SB(sb));
1675
1676 if (sb && (CIFS_SB(sb)->rsize > 127 * 1024)) {
1677 if ((cap & CIFS_UNIX_LARGE_READ_CAP) == 0) {
1678 CIFS_SB(sb)->rsize = 127 * 1024;
1679#ifdef CONFIG_CIFS_DEBUG2
1680 cFYI(1,("larger reads not supported by srv"));
1681#endif
1682 }
1683 }
1684
1675 1685
1676 cFYI(1,("Negotiate caps 0x%x",(int)cap)); 1686 cFYI(1,("Negotiate caps 0x%x",(int)cap));
1677#ifdef CONFIG_CIFS_DEBUG2 1687#ifdef CONFIG_CIFS_DEBUG2
1678 if(cap & CIFS_UNIX_FCNTL_CAP) 1688 if (cap & CIFS_UNIX_FCNTL_CAP)
1679 cFYI(1,("FCNTL cap")); 1689 cFYI(1,("FCNTL cap"));
1680 if(cap & CIFS_UNIX_EXTATTR_CAP) 1690 if (cap & CIFS_UNIX_EXTATTR_CAP)
1681 cFYI(1,("EXTATTR cap")); 1691 cFYI(1,("EXTATTR cap"));
1682 if(cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) 1692 if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP)
1683 cFYI(1,("POSIX path cap")); 1693 cFYI(1,("POSIX path cap"));
1684 if(cap & CIFS_UNIX_XATTR_CAP) 1694 if (cap & CIFS_UNIX_XATTR_CAP)
1685 cFYI(1,("XATTR cap")); 1695 cFYI(1,("XATTR cap"));
1686 if(cap & CIFS_UNIX_POSIX_ACL_CAP) 1696 if (cap & CIFS_UNIX_POSIX_ACL_CAP)
1687 cFYI(1,("POSIX ACL cap")); 1697 cFYI(1,("POSIX ACL cap"));
1698 if (cap & CIFS_UNIX_LARGE_READ_CAP)
1699 cFYI(1,("very large read cap"));
1700 if (cap & CIFS_UNIX_LARGE_WRITE_CAP)
1701 cFYI(1,("very large write cap"));
1688#endif /* CIFS_DEBUG2 */ 1702#endif /* CIFS_DEBUG2 */
1689 if (CIFSSMBSetFSUnixInfo(xid, tcon, cap)) { 1703 if (CIFSSMBSetFSUnixInfo(xid, tcon, cap)) {
1690 cFYI(1,("setting capabilities failed")); 1704 cFYI(1,("setting capabilities failed"));
@@ -1935,13 +1949,14 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
1935 cERROR(1,("rsize %d too large, using MaxBufSize", 1949 cERROR(1,("rsize %d too large, using MaxBufSize",
1936 volume_info.rsize)); 1950 volume_info.rsize));
1937 cifs_sb->rsize = CIFSMaxBufSize; 1951 cifs_sb->rsize = CIFSMaxBufSize;
1938 } else if((volume_info.rsize) && (volume_info.rsize <= CIFSMaxBufSize)) 1952 } else if ((volume_info.rsize) &&
1953 (volume_info.rsize <= CIFSMaxBufSize))
1939 cifs_sb->rsize = volume_info.rsize; 1954 cifs_sb->rsize = volume_info.rsize;
1940 else /* default */ 1955 else /* default */
1941 cifs_sb->rsize = CIFSMaxBufSize; 1956 cifs_sb->rsize = CIFSMaxBufSize;
1942 1957
1943 if (volume_info.wsize > PAGEVEC_SIZE * PAGE_CACHE_SIZE) { 1958 if (volume_info.wsize > PAGEVEC_SIZE * PAGE_CACHE_SIZE) {
1944 cERROR(1,("wsize %d too large using 4096 instead", 1959 cERROR(1,("wsize %d too large, using 4096 instead",
1945 volume_info.wsize)); 1960 volume_info.wsize));
1946 cifs_sb->wsize = 4096; 1961 cifs_sb->wsize = 4096;
1947 } else if (volume_info.wsize) 1962 } else if (volume_info.wsize)
@@ -1960,7 +1975,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
1960 if (cifs_sb->rsize < 2048) { 1975 if (cifs_sb->rsize < 2048) {
1961 cifs_sb->rsize = 2048; 1976 cifs_sb->rsize = 2048;
1962 /* Windows ME may prefer this */ 1977 /* Windows ME may prefer this */
1963 cFYI(1,("readsize set to minimum 2048")); 1978 cFYI(1,("readsize set to minimum: 2048"));
1964 } 1979 }
1965 /* calculate prepath */ 1980 /* calculate prepath */
1966 cifs_sb->prepath = volume_info.prepath; 1981 cifs_sb->prepath = volume_info.prepath;
@@ -2116,7 +2131,13 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
2116 /* tell server which Unix caps we support */ 2131 /* tell server which Unix caps we support */
2117 if (tcon->ses->capabilities & CAP_UNIX) 2132 if (tcon->ses->capabilities & CAP_UNIX)
2118 reset_cifs_unix_caps(xid, tcon, sb, &volume_info); 2133 reset_cifs_unix_caps(xid, tcon, sb, &volume_info);
2119 2134 else if(cifs_sb->rsize > (1024 * 127)) {
2135 cifs_sb->rsize = 1024 * 127;
2136#ifdef CONFIG_CIFS_DEBUG2
2137 cFYI(1,("no very large read support, rsize 127K"));
2138#endif
2139
2140 }
2120 if (!(tcon->ses->capabilities & CAP_LARGE_WRITE_X)) 2141 if (!(tcon->ses->capabilities & CAP_LARGE_WRITE_X))
2121 cifs_sb->wsize = min(cifs_sb->wsize, 2142 cifs_sb->wsize = min(cifs_sb->wsize,
2122 (tcon->ses->server->maxBuf - 2143 (tcon->ses->server->maxBuf -