Commit Graph

54 Commits

Author SHA1 Message Date
Steve French c18c842b1f [CIFS] Allow disabling CIFS Unix Extensions as mount option
Previously the only way to do this was to umount all mounts to that server,
turn off a proc setting (/proc/fs/cifs/LinuxExtensionsEnabled).

Fixes Samba bugzilla bug number: 4582 (and also 2008)

Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-07-18 23:21:09 +00:00
Steve French 50c2f75388 [CIFS] whitespace/formatting fixes
This should be the last big batch of whitespace/formatting fixes.
checkpatch warnings for the cifs directory are down about 90% and
many of the remaining ones are harder to remove or make the code
harder to read.

Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-07-13 00:33:32 +00:00
Steve French 3870253efb [CIFS] more whitespace fixes
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-07-08 15:40:40 +00:00
Steve French 790fe579f5 [CIFS] more whitespace cleanup
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-07-07 19:25:05 +00:00
Steve French 6dc0f87e35 [CIFS] whitespace cleanup
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-07-06 23:13:06 +00:00
Randy Dunlap e63340ae6b header cleaning: don't include smp_lock.h when not used
Remove includes of <linux/smp_lock.h> where it is not used/needed.
Suggested by Al Viro.

Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:07 -07:00
Steve French 4523cc3044 [CIFS] UID/GID override on CIFS mounts to Samba
When CIFS Unix Extensions are negotiated we get the Unix uid and gid
owners of the file from the server (on the Unix Query Path Info
levels), but if the server's uids don't match the client uid's users
were having to disable the Unix Extensions (which turned off features
they still wanted).   The changeset patch allows users to override uid
and/or gid for file/directory owner with a default uid and/or gid
specified at mount (as is often done when mounting from Linux cifs
client to Windows server).  This changeset also displays the uid
and gid used by default in /proc/mounts (if applicable).

Also cleans up code by adding some of the missing spaces after
"if" keywords per-kernel style guidelines (as suggested by Randy Dunlap
when he reviewed the patch).

Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-04-30 20:13:06 +00:00
vignesh eaa33a9ac0 [CIFS] Replace kmalloc/memset combination with kzalloc
Signed-off-by: Vignesh Babu <vignesh.babu@wipro.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-04-25 12:13:48 +00:00
Christoph Hellwig c33f8d3274 [CIFS] Remove unnecessary checks
file->f_path.dentry or file->f_path.dentry.d_inode can't be NULL since at
least ten years, similar for all but very few arguments passed in from the
VFS.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-04-02 18:47:20 +00:00
Alan Tyson f5c1e2ea71 [CIFS] reset mode when client notices that ATTR_READONLY is no longer set
Signed-off-by: Alan Tyso <atyson@hp.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-03-10 06:05:14 +00:00
Steve French 3677db10a6 [CIFS] Fix locking problem around some cifs uses of i_size write
Could cause hangs on smp systems in i_size_read on a cifs inode
whose size has been previously simultaneously updated from
different processes.

Thanks to Brian Wang for some great testing/debugging on this
hard problem.

Fixes kernel bugzilla #7903

CC: Shirish Pargoankar <shirishp@us.ibm.com>
CC: Shaggy <shaggy@us.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-02-26 16:46:11 +00:00
Steve French 1b2b212603 [CIFS] mtime bounces from local to remote when cifs nocmtime i_flags overwritten
atime flag was also overwritten. Noticed by Shirish when he was debugging
an atime problem.  Should help performance a bit too.

cifs should be getting time stamps from the server (that was the original
intent too)

Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-02-17 04:30:54 +00:00
Steve French 7ba526316a [CIFS] Allow update of EOF on remote extend of file
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-02-08 18:14:13 +00:00
Steve French a850790f6c [CIFS] Minor cleanup
Missing tab.  Missing entry in changelog

Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-02-06 20:43:30 +00:00
Josef "Jeff" Sipek e6a002964c [PATCH] cifs: change uses of f_{dentry, vfsmnt} to use f_path
Change all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt} in the cifs
filesystem.

Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:43 -08:00
Steve French 7ca85ba752 [CIFS] Fix readdir breakage when blocksize set too small
Do not treat filldir running out of space as an error that needs
to be returned.

Fixes Redhat bugzilla bug # 211070

Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-10-30 21:42:57 +00:00
Linus Torvalds 12e36b2f41 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
2006-10-13 08:09:29 -07:00
Steve French ddae957da4 [CIFS] fix typo in previous patch
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-10-12 01:23:29 +00:00
Steve French 533f90af6d [CIFS] Fix old DOS time conversion to handle timezone
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-10-12 00:02:32 +00:00
Steve French 268f3be177 [CIFS] readdir (ffirst) enablement of accurate timestamps from legacy servers
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-10-06 21:47:09 +00:00
Steve French 203cf2fc13 [CIFS] Fix readdir of large directories for backlevel servers
(were not setting all of resume key)

Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-10-01 19:59:41 +00:00
Steve French 1bd5bbcb65 [CIFS] Legacy time handling for Win9x and OS/2 part 1
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-09-28 03:35:57 +00:00
Theodore Ts'o ba52de123d [PATCH] inode-diet: Eliminate i_blksize from the inode structure
This eliminates the i_blksize field from struct inode.  Filesystems that want
to provide a per-inode st_blksize can do so by providing their own getattr
routine instead of using the generic_fillattr() function.

Note that some filesystems were providing pretty much random (and incorrect)
values for i_blksize.

[bunk@stusta.de: cleanup]
[akpm@osdl.org: generic_fillattr() fix]
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27 08:26:18 -07:00
Steve French b835bebe95 [CIFS] Fix CIFS readdir access denied when SE Linux enabled
CIFS had one path in which dentry was instantiated before the corresponding
inode metadata was filled in.

Fixes Redhat bugzilla bug #163493

Signed-off-by: Steve French <sfrench@us.ibm.com>
Acked-by: Eric Paris <eparis@redhat.com>
Acked-by: Dave Kleikamp <shaggy@austin.ibm.com>
2006-09-06 22:02:22 +00:00
Steve French 5ddaa683a5 [CIFS] endian errors in lanman protocol support
le16 compared to host-endian constant
	u8 fed to le32_to_cpu()
	le16 compared to host-endian constant

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-08-15 13:35:48 +00:00
Steve French 5bafd76593 [CIFS] Add support for readdir to legacy servers
Fixes oops to OS/2 on ls and removes redundant NTCreateX calls to servers
which do not support NT SMBs.  Key operations to OS/2 work.

Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-06-07 00:18:43 +00:00
Dave Kleikamp 273d81d6ad [CIFS] Do not overwrite aops
cifs should not be overwriting an element of the aops structure, since the
structure is shared by all cifs inodes.  Instead define a separate aops
structure to suit each purpose.

I also took the liberty of replacing a hard-coded 4096 with PAGE_CACHE_SIZE

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Steven French <sfrench@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-06-01 19:41:23 +00:00
Steve French 3979877e56 [CIFS] Support for setting up SMB sessions to legacy lanman servers 2006-05-31 22:40:51 +00:00
Steve French 26a21b980b [CIFS] Cleanup extra whitespace in dmesg logging. Update cifs change log 2006-05-31 18:05:34 +00:00
Steve French b66ac3ea21 [CIFS] Fix typo in previous
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-04-23 01:54:50 +00:00
Steve French 60808233f3 [CIFS] Readdir fixes to allow search to start at arbitrary position
in directory

Also includes first part of fix to compensate for servers which forget
to return . and .. as well as updates to changelog and cifs readme.

Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-04-22 15:53:05 +00:00
Steve French 0bd4fa977f [CIFS] [CIFS] Do not take rename sem on most path based calls (during
building of full path) to avoid hang rename/readdir hang

Reported by Alan Tyson

Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-04-21 18:17:42 +00:00
Steve French d62e54abca Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-03-31 03:35:56 +00:00
Andrew Morton 5515eff811 [PATCH] 2tb-files-add-blkcnt_t-fixes
Cc: Takashi Sato <sho@tnes.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-26 08:57:00 -08:00
Arjan van de Ven a11f3a0574 [PATCH] sem2mutex: vfs_rename_mutex
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-23 07:38:12 -08:00
Steve French d47d7c1a85 [CIFS] CIFS readdir perf optimizations part 1
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-02-28 03:45:48 +00:00
Steve French f3f6ec4b77 [CIFS] Fix cifs trying to write to f_ops
patch 2ea55c01e0 fixed CIFS clobbering the
global fops structure for some per mount setting, by duplicating and having
2 fops structs. However the write to the fops was left behind, which is a
NOP in practice (due to the fact that we KNOW the fops has that field set
to NULL already due to the duplication). So remove it... In addition, another
instance of the same bug was forgotten in november.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-08 20:12:58 -08:00
Steve French 3020a1f58c [CIFS] Fix scheduling while atomic when pending writes at file close time
Fix the case in which readdir reset file type when SFU mount option
specified.

Also fix sfu related functions to not request EAs (xattrs) when not
configured in Kconfig

Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-18 11:31:10 -08:00
Steve French e89dc92096 [CIFS] Cleanup sparse warnings for unicode little endian casts
Following Shaggy's suggestion, do a better job on the unicode string
handling routines in cifs in specifying that the wchar_t are really
little endian widechars (__le16).

Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-11 15:18:19 -08:00
Steve French 8b94bcb923 [CIFS] Fix CIFS "nobrl" mount option so does not disable sending brl requests
for all mounts just that particular mount.

Found by Arjan Vand de Ven

Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-11 11:41:00 -08:00
Steve French eafe870121 [CIFS] Fix readdir caching when unlink removes file in current search
buffer, and this is followed by a rewind search to just before
the deleted entry.

Signed-off-by: Steve French (sfrench@us.ibm.com)
2005-09-15 21:47:30 -07:00
Steve French bfa0d75a1e [CIFS] Add support for legacy servers part 5
Handle small negotiated read sizes (under 4K) and finish up
read and write support.

Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-08-31 21:50:37 -07:00
Steve French 7f57356b70 [CIFS] Remove cifs_sb argument from *build_path_from_dentry
This argument was added in a recent patch, but is unnecessary, since
the superblock is easily obtained from the dentry.

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-08-30 11:32:14 -07:00
Steve French b92327fe6b [CIFS] Finish up of case-insensitive dentry handling for cifs. This
will eventually (or should eventually) be common code for jfs, smbfs,
etc. but in the meantime is small enough and necessary when mounting
case insensitive to Windows (nocase).

Signed-off-by: Shaggy (shaggy@austin.ibm.com)
Signed-off-by: Steve French (sfrench@us.ibm.com)
2005-08-22 20:09:43 -07:00
Steve French c46fa8acdc [CIFS] Add mount option for disabling sending byte range lock requests
over the wire (to help the case when applications break with cifs mandatory
lock behavior.  Add part one of mount option for requesting case
insensitive path name matching.

Signed-off-by: Steve French (sfrench@us.ibm.com)
2005-08-18 20:49:57 -07:00
Steve French eda3c02989 [CIFS] Add compat with SFU (part 2)
Creating FIFOs to non-Unix servers (with cifs mounts for which sfu option
was specified) now works.

Signed-off-by: Steve French (sfrench@us.ibm.com)

Thanks to Martin Koeppe for his assistance
2005-07-21 15:20:28 -07:00
Jeremy Allison ac67055ef2 [CIFS] POSIX extensions, SetFSInfo added
Signed-off-by: Steve French@sfrench@us.ibm.com
Signed-off-by: Jeremy Allison (jra@samba.org)
2005-06-22 17:26:35 -07:00
Steve French dfb7533b5f [CIFS] Add stats for findfirst, findnext, findclose
Signed-off-by: Steve French (sfrench@us.ibm.com)
2005-06-22 17:13:47 -07:00
Steve French 09d1db5c61 [PATCH] cifs: improve check for search entry going beyond end of SMB transact
Signed-off-by: Steve French (sfrench@us.ibm.com)
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-28 22:41:08 -07:00
Steve French 966ca92347 [PATCH] cifs: Fix caching problem
pointed out by Dave Stahl and Vince Negri in which cifs can update the
last modify time on a server modified file without invalidating the
local cached data due to an intervening readdir. 

Signed-off-by: Steve French (sfrench@us.ibm.com)
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-28 22:41:08 -07:00