aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-06-22 20:26:35 -0400
committerSteve French <sfrench@hera.kernel.org>2005-06-22 20:26:35 -0400
commitac67055ef2378ea95c34b593ddf9d0a0737a240a (patch)
tree78f76cde63f158b318a57a3972a77731d8fb0ef6 /fs/cifs/connect.c
parentdfb7533b5f157ac7135da23883e80d895227d965 (diff)
[CIFS] POSIX extensions, SetFSInfo added
Signed-off-by: Steve French@sfrench@us.ibm.com Signed-off-by: Jeremy Allison (jra@samba.org)
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index e568cc47a7f9..bef5d6f30975 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -74,6 +74,7 @@ struct smb_vol {
74 unsigned server_ino:1; /* use inode numbers from server ie UniqueId */ 74 unsigned server_ino:1; /* use inode numbers from server ie UniqueId */
75 unsigned direct_io:1; 75 unsigned direct_io:1;
76 unsigned remap:1; /* set to remap seven reserved chars in filenames */ 76 unsigned remap:1; /* set to remap seven reserved chars in filenames */
77 unsigned posix_paths:1; /* unset to not ask for posix pathnames. */
77 unsigned int rsize; 78 unsigned int rsize;
78 unsigned int wsize; 79 unsigned int wsize;
79 unsigned int sockopt; 80 unsigned int sockopt;
@@ -745,6 +746,9 @@ cifs_parse_mount_options(char *options, const char *devname,struct smb_vol *vol)
745 /* vol->retry default is 0 (i.e. "soft" limited retry not hard retry) */ 746 /* vol->retry default is 0 (i.e. "soft" limited retry not hard retry) */
746 vol->rw = TRUE; 747 vol->rw = TRUE;
747 748
749 /* default is always to request posix paths. */
750 vol->posix_paths = 1;
751
748 if (!options) 752 if (!options)
749 return 1; 753 return 1;
750 754
@@ -1023,6 +1027,10 @@ cifs_parse_mount_options(char *options, const char *devname,struct smb_vol *vol)
1023 vol->remap = 1; 1027 vol->remap = 1;
1024 } else if (strnicmp(data, "nomapchars", 10) == 0) { 1028 } else if (strnicmp(data, "nomapchars", 10) == 0) {
1025 vol->remap = 0; 1029 vol->remap = 0;
1030 } else if (strnicmp(data, "posixpaths", 10) == 0) {
1031 vol->posix_paths = 1;
1032 } else if (strnicmp(data, "noposixpaths", 12) == 0) {
1033 vol->posix_paths = 0;
1026 } else if (strnicmp(data, "setuids", 7) == 0) { 1034 } else if (strnicmp(data, "setuids", 7) == 0) {
1027 vol->setuids = 1; 1035 vol->setuids = 1;
1028 } else if (strnicmp(data, "nosetuids", 9) == 0) { 1036 } else if (strnicmp(data, "nosetuids", 9) == 0) {
@@ -1679,6 +1687,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
1679 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_MAP_SPECIAL_CHR; 1687 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_MAP_SPECIAL_CHR;
1680 if(volume_info.no_xattr) 1688 if(volume_info.no_xattr)
1681 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_XATTR; 1689 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_XATTR;
1690
1682 if(volume_info.direct_io) { 1691 if(volume_info.direct_io) {
1683 cERROR(1,("mounting share using direct i/o")); 1692 cERROR(1,("mounting share using direct i/o"));
1684 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO; 1693 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO;
@@ -1781,6 +1790,17 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
1781 cFYI(1,("server negotiated posix acl support")); 1790 cFYI(1,("server negotiated posix acl support"));
1782 sb->s_flags |= MS_POSIXACL; 1791 sb->s_flags |= MS_POSIXACL;
1783 } 1792 }
1793
1794 /* Try and negotiate POSIX pathnames if we can. */
1795 if (volume_info.posix_paths && (CIFS_UNIX_POSIX_PATHNAMES_CAP &
1796 le64_to_cpu(tcon->fsUnixInfo.Capability))) {
1797 if (!CIFSSMBSETFSUnixInfo(xid, tcon, CIFS_UNIX_POSIX_PATHNAMES_CAP, 0)) {
1798 cFYI(1,("negotiated posix pathnames support"));
1799 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_POSIX_PATHS;
1800 } else {
1801 cFYI(1,("posix pathnames support requested but not supported"));
1802 }
1803 }
1784 } 1804 }
1785 } 1805 }
1786 } 1806 }