diff options
-rw-r--r-- | fs/Kconfig | 53 | ||||
-rw-r--r-- | fs/cifs/CHANGES | 2 | ||||
-rw-r--r-- | fs/cifs/cifs_unicode.c | 5 | ||||
-rw-r--r-- | fs/cifs/cifsfs.c | 11 | ||||
-rw-r--r-- | fs/cifs/cifsproto.h | 2 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 2 | ||||
-rw-r--r-- | fs/cifs/cn_cifs.h | 37 | ||||
-rw-r--r-- | fs/cifs/connect.c | 1 | ||||
-rw-r--r-- | fs/cifs/inode.c | 2 | ||||
-rw-r--r-- | include/linux/connector.h | 2 |
10 files changed, 96 insertions, 21 deletions
diff --git a/fs/Kconfig b/fs/Kconfig index 7d6ae369ce44..d5255e627b5f 100644 --- a/fs/Kconfig +++ b/fs/Kconfig | |||
@@ -1601,9 +1601,10 @@ config CIFS | |||
1601 | PC operating systems. The CIFS protocol is fully supported by | 1601 | PC operating systems. The CIFS protocol is fully supported by |
1602 | file servers such as Windows 2000 (including Windows 2003, NT 4 | 1602 | file servers such as Windows 2000 (including Windows 2003, NT 4 |
1603 | and Windows XP) as well by Samba (which provides excellent CIFS | 1603 | and Windows XP) as well by Samba (which provides excellent CIFS |
1604 | server support for Linux and many other operating systems). Currently | 1604 | server support for Linux and many other operating systems). Limited |
1605 | you must use the smbfs client filesystem to access older SMB servers | 1605 | support for Windows ME and similar servers is provided as well. |
1606 | such as Windows 9x and OS/2. | 1606 | You must use the smbfs client filesystem to access older SMB servers |
1607 | such as OS/2 and DOS. | ||
1607 | 1608 | ||
1608 | The intent of the cifs module is to provide an advanced | 1609 | The intent of the cifs module is to provide an advanced |
1609 | network file system client for mounting to CIFS compliant servers, | 1610 | network file system client for mounting to CIFS compliant servers, |
@@ -1614,7 +1615,7 @@ config CIFS | |||
1614 | cifs if running only a (Samba) server. It is possible to enable both | 1615 | cifs if running only a (Samba) server. It is possible to enable both |
1615 | smbfs and cifs (e.g. if you are using CIFS for accessing Windows 2003 | 1616 | smbfs and cifs (e.g. if you are using CIFS for accessing Windows 2003 |
1616 | and Samba 3 servers, and smbfs for accessing old servers). If you need | 1617 | and Samba 3 servers, and smbfs for accessing old servers). If you need |
1617 | to mount to Samba or Windows 2003 servers from this machine, say Y. | 1618 | to mount to Samba or Windows from this machine, say Y. |
1618 | 1619 | ||
1619 | config CIFS_STATS | 1620 | config CIFS_STATS |
1620 | bool "CIFS statistics" | 1621 | bool "CIFS statistics" |
@@ -1623,8 +1624,22 @@ config CIFS_STATS | |||
1623 | Enabling this option will cause statistics for each server share | 1624 | Enabling this option will cause statistics for each server share |
1624 | mounted by the cifs client to be displayed in /proc/fs/cifs/Stats | 1625 | mounted by the cifs client to be displayed in /proc/fs/cifs/Stats |
1625 | 1626 | ||
1627 | config CIFS_STATS2 | ||
1628 | bool "CIFS extended statistics" | ||
1629 | depends on CIFS_STATS | ||
1630 | help | ||
1631 | Enabling this option will allow more detailed statistics on SMB | ||
1632 | request timing to be displayed in /proc/fs/cifs/DebugData and also | ||
1633 | allow optional logging of slow responses to dmesg (depending on the | ||
1634 | value of /proc/fs/cifs/cifsFYI, see fs/cifs/README for more details). | ||
1635 | These additional statistics may have a minor effect on performance | ||
1636 | and memory utilization. | ||
1637 | |||
1638 | Unless you are a developer or are doing network performance analysis | ||
1639 | or tuning, say N. | ||
1640 | |||
1626 | config CIFS_XATTR | 1641 | config CIFS_XATTR |
1627 | bool "CIFS extended attributes (EXPERIMENTAL)" | 1642 | bool "CIFS extended attributes" |
1628 | depends on CIFS | 1643 | depends on CIFS |
1629 | help | 1644 | help |
1630 | Extended attributes are name:value pairs associated with inodes by | 1645 | Extended attributes are name:value pairs associated with inodes by |
@@ -1636,11 +1651,11 @@ config CIFS_XATTR | |||
1636 | prefaced by the user namespace prefix. The system namespace | 1651 | prefaced by the user namespace prefix. The system namespace |
1637 | (used by some filesystems to store ACLs) is not supported at | 1652 | (used by some filesystems to store ACLs) is not supported at |
1638 | this time. | 1653 | this time. |
1639 | 1654 | ||
1640 | If unsure, say N. | 1655 | If unsure, say N. |
1641 | 1656 | ||
1642 | config CIFS_POSIX | 1657 | config CIFS_POSIX |
1643 | bool "CIFS POSIX Extensions (EXPERIMENTAL)" | 1658 | bool "CIFS POSIX Extensions" |
1644 | depends on CIFS_XATTR | 1659 | depends on CIFS_XATTR |
1645 | help | 1660 | help |
1646 | Enabling this option will cause the cifs client to attempt to | 1661 | Enabling this option will cause the cifs client to attempt to |
@@ -1653,10 +1668,28 @@ config CIFS_POSIX | |||
1653 | 1668 | ||
1654 | config CIFS_EXPERIMENTAL | 1669 | config CIFS_EXPERIMENTAL |
1655 | bool "CIFS Experimental Features (EXPERIMENTAL)" | 1670 | bool "CIFS Experimental Features (EXPERIMENTAL)" |
1656 | depends on CIFS | 1671 | depends on CIFS && EXPERIMENTAL |
1672 | help | ||
1673 | Enables cifs features under testing. These features are | ||
1674 | experimental and currently include support for writepages | ||
1675 | (multipage writebehind performance improvements) and directory | ||
1676 | change notification ie fcntl(F_DNOTIFY) as well as some security | ||
1677 | improvements. Some also depend on setting at runtime the | ||
1678 | pseudo-file /proc/fs/cifs/Experimental (which is disabled by | ||
1679 | default). See the file fs/cifs/README for more details. | ||
1680 | |||
1681 | If unsure, say N. | ||
1682 | |||
1683 | config CIFS_UPCALL | ||
1684 | bool "CIFS Kerberos/SPNEGO advanced session setup (EXPERIMENTAL)" | ||
1685 | depends on CIFS_EXPERIMENTAL | ||
1686 | select CONNECTOR | ||
1657 | help | 1687 | help |
1658 | Enables cifs features under testing. These features | 1688 | Enables an upcall mechanism for CIFS which will be used to contact |
1659 | are highly experimental. If unsure, say N. | 1689 | userspace helper utilities to provide SPNEGO packaged Kerberos |
1690 | tickets which are needed to mount to certain secure servers | ||
1691 | (for which more secure Kerberos authentication is required). If | ||
1692 | unsure, say N. | ||
1660 | 1693 | ||
1661 | config NCP_FS | 1694 | config NCP_FS |
1662 | tristate "NCP file system support (to mount NetWare volumes)" | 1695 | tristate "NCP file system support (to mount NetWare volumes)" |
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index 5bab24f59053..eab3750cf304 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES | |||
@@ -2,7 +2,7 @@ Version 1.39 | |||
2 | ------------ | 2 | ------------ |
3 | Defer close of a file handle slightly if pending writes depend on that file handle | 3 | Defer close of a file handle slightly if pending writes depend on that file handle |
4 | (this reduces the EBADF bad file handle errors that can be logged under heavy | 4 | (this reduces the EBADF bad file handle errors that can be logged under heavy |
5 | stress on writes). | 5 | stress on writes). Modify cifs Kconfig options to expose CONFIG_CIFS_STATS2 |
6 | 6 | ||
7 | Version 1.38 | 7 | Version 1.38 |
8 | ------------ | 8 | ------------ |
diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c index 99a096d3f84d..4e12053f0806 100644 --- a/fs/cifs/cifs_unicode.c +++ b/fs/cifs/cifs_unicode.c | |||
@@ -74,10 +74,11 @@ cifs_strtoUCS(wchar_t * to, const char *from, int len, | |||
74 | cERROR(1, | 74 | cERROR(1, |
75 | ("cifs_strtoUCS: char2uni returned %d", | 75 | ("cifs_strtoUCS: char2uni returned %d", |
76 | charlen)); | 76 | charlen)); |
77 | to[i] = cpu_to_le16(0x003f); /* a question mark */ | 77 | /* A question mark */ |
78 | to[i] = (wchar_t)cpu_to_le16(0x003f); | ||
78 | charlen = 1; | 79 | charlen = 1; |
79 | } else | 80 | } else |
80 | to[i] = cpu_to_le16(to[i]); | 81 | to[i] = (wchar_t)cpu_to_le16(to[i]); |
81 | 82 | ||
82 | } | 83 | } |
83 | 84 | ||
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 877095a1192a..682b0235ad9a 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -405,6 +405,7 @@ static struct quotactl_ops cifs_quotactl_ops = { | |||
405 | }; | 405 | }; |
406 | #endif | 406 | #endif |
407 | 407 | ||
408 | #ifdef CONFIG_CIFS_EXPERIMENTAL | ||
408 | static void cifs_umount_begin(struct super_block * sblock) | 409 | static void cifs_umount_begin(struct super_block * sblock) |
409 | { | 410 | { |
410 | struct cifs_sb_info *cifs_sb; | 411 | struct cifs_sb_info *cifs_sb; |
@@ -422,16 +423,18 @@ static void cifs_umount_begin(struct super_block * sblock) | |||
422 | tcon->tidStatus = CifsExiting; | 423 | tcon->tidStatus = CifsExiting; |
423 | up(&tcon->tconSem); | 424 | up(&tcon->tconSem); |
424 | 425 | ||
426 | /* cancel_brl_requests(tcon); */ | ||
427 | /* cancel_notify_requests(tcon); */ | ||
425 | if(tcon->ses && tcon->ses->server) | 428 | if(tcon->ses && tcon->ses->server) |
426 | { | 429 | { |
427 | cERROR(1,("wake up tasks now - umount begin not complete")); | 430 | cFYI(1,("wake up tasks now - umount begin not complete")); |
428 | wake_up_all(&tcon->ses->server->request_q); | 431 | wake_up_all(&tcon->ses->server->request_q); |
429 | } | 432 | } |
430 | /* BB FIXME - finish add checks for tidStatus BB */ | 433 | /* BB FIXME - finish add checks for tidStatus BB */ |
431 | 434 | ||
432 | return; | 435 | return; |
433 | } | 436 | } |
434 | 437 | #endif | |
435 | 438 | ||
436 | static int cifs_remount(struct super_block *sb, int *flags, char *data) | 439 | static int cifs_remount(struct super_block *sb, int *flags, char *data) |
437 | { | 440 | { |
@@ -450,7 +453,9 @@ struct super_operations cifs_super_ops = { | |||
450 | unless later we add lazy close of inodes or unless the kernel forgets to call | 453 | unless later we add lazy close of inodes or unless the kernel forgets to call |
451 | us with the same number of releases (closes) as opens */ | 454 | us with the same number of releases (closes) as opens */ |
452 | .show_options = cifs_show_options, | 455 | .show_options = cifs_show_options, |
453 | /* .umount_begin = cifs_umount_begin, */ /* BB finish in the future */ | 456 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
457 | .umount_begin = cifs_umount_begin, | ||
458 | #endif | ||
454 | .remount_fs = cifs_remount, | 459 | .remount_fs = cifs_remount, |
455 | }; | 460 | }; |
456 | 461 | ||
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index d301149b1bb0..1b73f4f4c5ce 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
@@ -242,11 +242,11 @@ extern int CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon, | |||
242 | const int netfid, const unsigned int count, | 242 | const int netfid, const unsigned int count, |
243 | const __u64 offset, unsigned int *nbytes, | 243 | const __u64 offset, unsigned int *nbytes, |
244 | struct kvec *iov, const int nvec, const int long_op); | 244 | struct kvec *iov, const int nvec, const int long_op); |
245 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | ||
245 | extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, | 246 | extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, |
246 | const unsigned char *searchName, __u64 * inode_number, | 247 | const unsigned char *searchName, __u64 * inode_number, |
247 | const struct nls_table *nls_codepage, | 248 | const struct nls_table *nls_codepage, |
248 | int remap_special_chars); | 249 | int remap_special_chars); |
249 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | ||
250 | extern int cifs_convertUCSpath(char *target, const __le16 *source, int maxlen, | 250 | extern int cifs_convertUCSpath(char *target, const __le16 *source, int maxlen, |
251 | const struct nls_table * codepage); | 251 | const struct nls_table * codepage); |
252 | extern int cifsConvertToUCS(__le16 * target, const char *source, int maxlen, | 252 | extern int cifsConvertToUCS(__le16 * target, const char *source, int maxlen, |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 9312bfc56682..a53c596e1082 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -2959,7 +2959,6 @@ CIFSFindClose(const int xid, struct cifsTconInfo *tcon, const __u16 searchHandle | |||
2959 | return rc; | 2959 | return rc; |
2960 | } | 2960 | } |
2961 | 2961 | ||
2962 | #ifdef CONFIG_CIFS_EXPERIMENTAL | ||
2963 | int | 2962 | int |
2964 | CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, | 2963 | CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, |
2965 | const unsigned char *searchName, | 2964 | const unsigned char *searchName, |
@@ -3053,7 +3052,6 @@ GetInodeNumOut: | |||
3053 | goto GetInodeNumberRetry; | 3052 | goto GetInodeNumberRetry; |
3054 | return rc; | 3053 | return rc; |
3055 | } | 3054 | } |
3056 | #endif /* CIFS_EXPERIMENTAL */ | ||
3057 | 3055 | ||
3058 | int | 3056 | int |
3059 | CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, | 3057 | CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, |
diff --git a/fs/cifs/cn_cifs.h b/fs/cifs/cn_cifs.h new file mode 100644 index 000000000000..ea59ccac2eb1 --- /dev/null +++ b/fs/cifs/cn_cifs.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * fs/cifs/cn_cifs.h | ||
3 | * | ||
4 | * Copyright (c) International Business Machines Corp., 2002 | ||
5 | * Author(s): Steve French (sfrench@us.ibm.com) | ||
6 | * | ||
7 | * This library is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU Lesser General Public License as published | ||
9 | * by the Free Software Foundation; either version 2.1 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This library is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | ||
15 | * the GNU Lesser General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU Lesser General Public License | ||
18 | * along with this library; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #ifndef _CN_CIFS_H | ||
23 | #define _CN_CIFS_H | ||
24 | #ifdef CONFIG_CIFS_UPCALL | ||
25 | #include <linux/types.h> | ||
26 | #include <linux/connector.h> | ||
27 | |||
28 | struct cifs_upcall { | ||
29 | char signature[4]; /* CIFS */ | ||
30 | enum command { | ||
31 | CIFS_GET_IP = 0x00000001, /* get ip address for hostname */ | ||
32 | CIFS_GET_SECBLOB = 0x00000002, /* get SPNEGO wrapped blob */ | ||
33 | } command; | ||
34 | /* union cifs upcall data follows */ | ||
35 | }; | ||
36 | #endif /* CIFS_UPCALL */ | ||
37 | #endif /* _CN_CIFS_H */ | ||
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 450ab75d6546..2cb620716bc1 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include "ntlmssp.h" | 42 | #include "ntlmssp.h" |
43 | #include "nterr.h" | 43 | #include "nterr.h" |
44 | #include "rfc1002pdu.h" | 44 | #include "rfc1002pdu.h" |
45 | #include "cn_cifs.h" | ||
45 | 46 | ||
46 | #define CIFS_PORT 445 | 47 | #define CIFS_PORT 445 |
47 | #define RFC1001_PORT 139 | 48 | #define RFC1001_PORT 139 |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 912d401600f6..923d071163b2 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -283,7 +283,6 @@ int cifs_get_inode_info(struct inode **pinode, | |||
283 | there Windows server or network appliances for which | 283 | there Windows server or network appliances for which |
284 | IndexNumber field is not guaranteed unique? */ | 284 | IndexNumber field is not guaranteed unique? */ |
285 | 285 | ||
286 | #ifdef CONFIG_CIFS_EXPERIMENTAL | ||
287 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM){ | 286 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM){ |
288 | int rc1 = 0; | 287 | int rc1 = 0; |
289 | __u64 inode_num; | 288 | __u64 inode_num; |
@@ -299,7 +298,6 @@ int cifs_get_inode_info(struct inode **pinode, | |||
299 | } else /* do we need cast or hash to ino? */ | 298 | } else /* do we need cast or hash to ino? */ |
300 | (*pinode)->i_ino = inode_num; | 299 | (*pinode)->i_ino = inode_num; |
301 | } /* else ino incremented to unique num in new_inode*/ | 300 | } /* else ino incremented to unique num in new_inode*/ |
302 | #endif /* CIFS_EXPERIMENTAL */ | ||
303 | insert_inode_hash(*pinode); | 301 | insert_inode_hash(*pinode); |
304 | } | 302 | } |
305 | inode = *pinode; | 303 | inode = *pinode; |
diff --git a/include/linux/connector.h b/include/linux/connector.h index c5769c6585f4..ad1a22c1c42e 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -32,6 +32,8 @@ | |||
32 | */ | 32 | */ |
33 | #define CN_IDX_PROC 0x1 | 33 | #define CN_IDX_PROC 0x1 |
34 | #define CN_VAL_PROC 0x1 | 34 | #define CN_VAL_PROC 0x1 |
35 | #define CN_IDX_CIFS 0x2 | ||
36 | #define CN_VAL_CIFS 0x1 | ||
35 | 37 | ||
36 | #define CN_NETLINK_USERS 1 | 38 | #define CN_NETLINK_USERS 1 |
37 | 39 | ||