aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-13 11:09:29 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-13 11:09:29 -0400
commit12e36b2f41b6cbc67386fcb9c59c32a3e2033905 (patch)
treeec1794bae2f96eef6cc2afb2fa5c48e6fd346316 /fs/cifs/cifsfs.c
parent1baaf0b424fe611a99cf3e2e59e84df0561d679a (diff)
parent1a4e15a04ec69cb3552f4120079f5472377df5f7 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (27 commits) [CIFS] Missing flags2 for DFS [CIFS] Workaround incomplete byte length returned by some [CIFS] cifs Kconfig: don't select CONNECTOR [CIFS] Level 1 QPathInfo needed for proper OS2 support [CIFS] fix typo in previous patch [CIFS] Fix old DOS time conversion to handle timezone [CIFS] Do not need to adjust for Jan/Feb for leap day [CIFS] Fix leaps year calculation for years after 2100 [CIFS] readdir (ffirst) enablement of accurate timestamps from legacy servers [CIFS] Fix compiler warning with previous patch [CIFS] Fix typo [CIFS] Allow for 15 minute TZs (e.g. Nepal) and be more explicit about [CIFS] Fix readdir of large directories for backlevel servers [CIFS] Allow LANMAN21 support even in both POSIX non-POSIX path [CIFS] Make use of newer QFSInfo dependent on capability bit instead of [CIFS] Do not send newer QFSInfo to legacy servers which can not support it [CIFS] Fix typo in name of new cifs_show_stats [CIFS] Rename server time zone field [CIFS] Handle legacy servers which return undefined time zone [CIFS] CIFS support for /proc/<pid>/mountstats part 1 ... Manual conflict resolution in fs/cifs/connect.c
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index c00c654f2e11..84976cdbe713 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -63,6 +63,7 @@ extern struct task_struct * oplockThread; /* remove sparse warning */
63struct task_struct * oplockThread = NULL; 63struct task_struct * oplockThread = NULL;
64extern struct task_struct * dnotifyThread; /* remove sparse warning */ 64extern struct task_struct * dnotifyThread; /* remove sparse warning */
65struct task_struct * dnotifyThread = NULL; 65struct task_struct * dnotifyThread = NULL;
66static struct super_operations cifs_super_ops;
66unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE; 67unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE;
67module_param(CIFSMaxBufSize, int, 0); 68module_param(CIFSMaxBufSize, int, 0);
68MODULE_PARM_DESC(CIFSMaxBufSize,"Network buffer size (not including header). Default: 16384 Range: 8192 to 130048"); 69MODULE_PARM_DESC(CIFSMaxBufSize,"Network buffer size (not including header). Default: 16384 Range: 8192 to 130048");
@@ -198,10 +199,12 @@ cifs_statfs(struct dentry *dentry, struct kstatfs *buf)
198 /* Only need to call the old QFSInfo if failed 199 /* Only need to call the old QFSInfo if failed
199 on newer one */ 200 on newer one */
200 if(rc) 201 if(rc)
201 rc = CIFSSMBQFSInfo(xid, pTcon, buf); 202 if(pTcon->ses->capabilities & CAP_NT_SMBS)
203 rc = CIFSSMBQFSInfo(xid, pTcon, buf); /* not supported by OS2 */
202 204
203 /* Old Windows servers do not support level 103, retry with level 205 /* Some old Windows servers also do not support level 103, retry with
204 one if old server failed the previous call */ 206 older level one if old server failed the previous call or we
207 bypassed it because we detected that this was an older LANMAN sess */
205 if(rc) 208 if(rc)
206 rc = SMBOldQFSInfo(xid, pTcon, buf); 209 rc = SMBOldQFSInfo(xid, pTcon, buf);
207 /* 210 /*
@@ -435,13 +438,21 @@ static void cifs_umount_begin(struct vfsmount * vfsmnt, int flags)
435 return; 438 return;
436} 439}
437 440
441#ifdef CONFIG_CIFS_STATS2
442static int cifs_show_stats(struct seq_file *s, struct vfsmount *mnt)
443{
444 /* BB FIXME */
445 return 0;
446}
447#endif
448
438static int cifs_remount(struct super_block *sb, int *flags, char *data) 449static int cifs_remount(struct super_block *sb, int *flags, char *data)
439{ 450{
440 *flags |= MS_NODIRATIME; 451 *flags |= MS_NODIRATIME;
441 return 0; 452 return 0;
442} 453}
443 454
444struct super_operations cifs_super_ops = { 455static struct super_operations cifs_super_ops = {
445 .read_inode = cifs_read_inode, 456 .read_inode = cifs_read_inode,
446 .put_super = cifs_put_super, 457 .put_super = cifs_put_super,
447 .statfs = cifs_statfs, 458 .statfs = cifs_statfs,
@@ -454,6 +465,9 @@ struct super_operations cifs_super_ops = {
454 .show_options = cifs_show_options, 465 .show_options = cifs_show_options,
455 .umount_begin = cifs_umount_begin, 466 .umount_begin = cifs_umount_begin,
456 .remount_fs = cifs_remount, 467 .remount_fs = cifs_remount,
468#ifdef CONFIG_CIFS_STATS2
469 .show_stats = cifs_show_stats,
470#endif
457}; 471};
458 472
459static int 473static int
@@ -495,7 +509,7 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
495static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) 509static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
496{ 510{
497 /* origin == SEEK_END => we must revalidate the cached file length */ 511 /* origin == SEEK_END => we must revalidate the cached file length */
498 if (origin == 2) { 512 if (origin == SEEK_END) {
499 int retval = cifs_revalidate(file->f_dentry); 513 int retval = cifs_revalidate(file->f_dentry);
500 if (retval < 0) 514 if (retval < 0)
501 return (loff_t)retval; 515 return (loff_t)retval;
@@ -903,7 +917,7 @@ init_cifs(void)
903#ifdef CONFIG_PROC_FS 917#ifdef CONFIG_PROC_FS
904 cifs_proc_init(); 918 cifs_proc_init();
905#endif 919#endif
906 INIT_LIST_HEAD(&GlobalServerList); /* BB not implemented yet */ 920/* INIT_LIST_HEAD(&GlobalServerList);*/ /* BB not implemented yet */
907 INIT_LIST_HEAD(&GlobalSMBSessionList); 921 INIT_LIST_HEAD(&GlobalSMBSessionList);
908 INIT_LIST_HEAD(&GlobalTreeConnectionList); 922 INIT_LIST_HEAD(&GlobalTreeConnectionList);
909 INIT_LIST_HEAD(&GlobalOplock_Q); 923 INIT_LIST_HEAD(&GlobalOplock_Q);
@@ -931,6 +945,7 @@ init_cifs(void)
931 GlobalCurrentXid = 0; 945 GlobalCurrentXid = 0;
932 GlobalTotalActiveXid = 0; 946 GlobalTotalActiveXid = 0;
933 GlobalMaxActiveXid = 0; 947 GlobalMaxActiveXid = 0;
948 memset(Local_System_Name, 0, 15);
934 rwlock_init(&GlobalSMBSeslock); 949 rwlock_init(&GlobalSMBSeslock);
935 spin_lock_init(&GlobalMid_Lock); 950 spin_lock_init(&GlobalMid_Lock);
936 951