aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-07-30 08:56:00 -0400
committerSteve French <sfrench@us.ibm.com>2010-09-29 15:04:31 -0400
commit736a33205969c16f81d747db14ff4c0f133609a6 (patch)
tree39705109ad4aee778be5d2b3dfe2f3e7c9ad246c /fs/cifs
parent1b12b9c15b4371d83b729b8fc18c670e78a1479b (diff)
cifs: add "mfsymlinks" mount option
This is the start for an implementation of "Minshall+French Symlinks" (see http://wiki.samba.org/index.php/UNIX_Extensions#Minshall.2BFrench_symlinks). Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/README5
-rw-r--r--fs/cifs/cifsfs.c2
-rw-r--r--fs/cifs/connect.c11
3 files changed, 18 insertions, 0 deletions
diff --git a/fs/cifs/README b/fs/cifs/README
index 7099a526f775..ee68d1036544 100644
--- a/fs/cifs/README
+++ b/fs/cifs/README
@@ -527,6 +527,11 @@ A partial list of the supported mount options follows:
527 SFU does). In the future the bottom 9 bits of the 527 SFU does). In the future the bottom 9 bits of the
528 mode also will be emulated using queries of the security 528 mode also will be emulated using queries of the security
529 descriptor (ACL). 529 descriptor (ACL).
530 mfsymlinks Enable support for Minshall+French symlinks
531 (see http://wiki.samba.org/index.php/UNIX_Extensions#Minshall.2BFrench_symlinks)
532 This option is ignored when specified together with the
533 'sfu' option. Minshall+French symlinks are used even if
534 the server supports the CIFS Unix Extensions.
530 sign Must use packet signing (helps avoid unwanted data modification 535 sign Must use packet signing (helps avoid unwanted data modification
531 by intermediate systems in the route). Note that signing 536 by intermediate systems in the route). Note that signing
532 does not work with lanman or plaintext authentication. 537 does not work with lanman or plaintext authentication.
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 1b6ddd6f760f..52e89ea07458 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -441,6 +441,8 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
441 seq_printf(s, ",dynperm"); 441 seq_printf(s, ",dynperm");
442 if (m->mnt_sb->s_flags & MS_POSIXACL) 442 if (m->mnt_sb->s_flags & MS_POSIXACL)
443 seq_printf(s, ",acl"); 443 seq_printf(s, ",acl");
444 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS)
445 seq_printf(s, ",mfsymlinks");
444 446
445 seq_printf(s, ",rsize=%d", cifs_sb->rsize); 447 seq_printf(s, ",rsize=%d", cifs_sb->rsize);
446 seq_printf(s, ",wsize=%d", cifs_sb->wsize); 448 seq_printf(s, ",wsize=%d", cifs_sb->wsize);
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index fa884520fb84..435b912f5de5 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -100,6 +100,7 @@ struct smb_vol {
100 bool noautotune:1; 100 bool noautotune:1;
101 bool nostrictsync:1; /* do not force expensive SMBflush on every sync */ 101 bool nostrictsync:1; /* do not force expensive SMBflush on every sync */
102 bool fsc:1; /* enable fscache */ 102 bool fsc:1; /* enable fscache */
103 bool mfsymlinks:1; /* use Minshall+French Symlinks */
103 unsigned int rsize; 104 unsigned int rsize;
104 unsigned int wsize; 105 unsigned int wsize;
105 bool sockopt_tcp_nodelay:1; 106 bool sockopt_tcp_nodelay:1;
@@ -1342,6 +1343,8 @@ cifs_parse_mount_options(char *options, const char *devname,
1342 "/proc/fs/cifs/LookupCacheEnabled to 0\n"); 1343 "/proc/fs/cifs/LookupCacheEnabled to 0\n");
1343 } else if (strnicmp(data, "fsc", 3) == 0) { 1344 } else if (strnicmp(data, "fsc", 3) == 0) {
1344 vol->fsc = true; 1345 vol->fsc = true;
1346 } else if (strnicmp(data, "mfsymlinks", 10) == 0) {
1347 vol->mfsymlinks = true;
1345 } else 1348 } else
1346 printk(KERN_WARNING "CIFS: Unknown mount option %s\n", 1349 printk(KERN_WARNING "CIFS: Unknown mount option %s\n",
1347 data); 1350 data);
@@ -2554,6 +2557,14 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info,
2554 cFYI(1, "mounting share using direct i/o"); 2557 cFYI(1, "mounting share using direct i/o");
2555 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO; 2558 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO;
2556 } 2559 }
2560 if (pvolume_info->mfsymlinks) {
2561 if (pvolume_info->sfu_emul) {
2562 cERROR(1, "mount option mfsymlinks ignored if sfu "
2563 "mount option is used");
2564 } else {
2565 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_MF_SYMLINKS;
2566 }
2567 }
2557 2568
2558 if ((pvolume_info->cifs_acl) && (pvolume_info->dynperm)) 2569 if ((pvolume_info->cifs_acl) && (pvolume_info->dynperm))
2559 cERROR(1, "mount option dynperm ignored if cifsacl " 2570 cERROR(1, "mount option dynperm ignored if cifsacl "