summaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
Commit message (Collapse)AuthorAgeFilesLines
* [CIFS] Allow disabling CIFS Unix Extensions as mount optionSteve French2007-07-181-6/+7
| | | | | | | | | 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>
* [CIFS] Typo in previous patchSteve French2007-07-161-2/+1
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] zero_user_page() conversionsEric2007-07-161-4/+1
| | | | | | Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Add support for new POSIX unlinkSteve French2007-07-151-1/+13
| | | | | | | | | | In the cleanup phase of the dbench test, we were noticing sharing violation followed by failed directory removals when dbench did not close the test files before the cleanup phase started. Using the new POSIX unlink, which Samba has supported for a few months, avoids this. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] whitespace/formatting fixesSteve French2007-07-131-16/+12
| | | | | | | | | 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>
* [CIFS] whitespace cleanupSteve French2007-07-101-128/+131
| | | | | | More than halfway there Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] CIFS should honour umaskSteve French2007-06-081-2/+3
| | | | | | | | | | | | | | | | | | | | This patch makes CIFS honour a process' umask like other filesystems. Of course the server is still free to munge the permissions if it wants to; but the client will send the "right" permissions to begin with. A few caveats: 1) It only applies to filesystems that have CAP_UNIX (aka support unix extensions) 2) It applies the correct mode to the follow up CIFSSMBUnixSetPerms() after remote creation When mode to CIFS/NTFS ACL mapping is complete we can do the same thing for that case for servers which do not support the Unix Extensions. Signed-off-by: Matt Keenen <matt@opcode-solutions.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] UID/GID override on CIFS mounts to SambaSteve French2007-04-301-22/+33
| | | | | | | | | | | | | | | | | | 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>
* [CIFS] New CIFS POSIX mkdir performance improvement (part 2)Steve French2007-04-251-11/+32
| | | | | | Fix incorrect parsing of return data Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] New CIFS POSIX mkdir performance improvementSteve French2007-04-231-3/+181
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Add write perm for usr to file on windows should remove r/o dos attrSteve French2007-04-061-11/+11
| | | | | | | | | | | Remove read only dos attribute on chmod when adding any write permission (ie on any of user/group/other (not all of user/group/other ie 0222) when mounted to windows. Suggested by: Urs Fleisch Signed-off-by: Urs Fleisch <urs.fleisch@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Allow reset of file to ATTR_NORMAL when archive bit not setSteve French2007-03-231-3/+12
| | | | | | | | | | | | When a file had a dos attribute of 0x1 (readonly - but dos attribute of archive was not set) - doing chmod 0777 or equivalent would try to set a dos attribute of 0 (which some servers ignore) rather than ATTR_NORMAL (0x20) which most servers accept. Does not affect servers which support the CIFS Unix Extensions. Acked-by: Prasad Potluri <pvp@us.ibm.com> Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] reset mode when client notices that ATTR_READONLY is no longer setAlan Tyson2007-03-101-0/+6
| | | | | | 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>
* [CIFS] Remove some unused functions/declarationsSteve French2007-02-271-1/+3
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] small piece missing from previous patchSteve French2007-02-261-5/+11
| | | | | | | | | | | There were two i_size_writes in the new truncate function - we missed one in the last patch. Noticed by Shaggy when he reviewed. Thank you Shaggy ... CC: Shaggy <shaggy@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix locking problem around some cifs uses of i_size writeSteve French2007-02-261-2/+48
| | | | | | | | | | | | | | | 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>
* [CIFS] mtime bounces from local to remote when cifs nocmtime i_flags overwrittenSteve French2007-02-171-0/+5
| | | | | | | | | | 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>
* [CIFS] fix &&/& typo in cifs_setattr()Steve French2007-02-151-1/+1
| | | | | | | Thanks to Dirk for pointing this out. Signed-off-by: Dirk Mueller <dmueller@suse.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Allow update of EOF on remote extend of fileSteve French2007-02-081-3/+3
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix timezone handling on stat to os/2Steve French2006-11-161-0/+6
| | | | | | We were adjusting for timezone on readdir but not on stat Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Explicitly set stat->blksizeSteve French2006-11-071-1/+3
| | | | | | | | CIFS may perform I/O over the network in larger chunks than the page size, so it should explicitly set stat->blksize to ensure optimal I/O bandwidth Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] report rename failure when target file is locked by WindowsSteve French2006-11-021-5/+9
| | | | | | | | | Fixes Samba bugzilla bug # 4182 Rename by handle failures (retry after rename by path) were not being returned back. Signed-off-by: Steve French <sfrench@us.ibm.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6Linus Torvalds2006-10-131-3/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * [CIFS] Level 1 QPathInfo needed for proper OS2 supportSteve French2006-10-121-1/+4
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] Legacy time handling for Win9x and OS/2 part 1Steve French2006-09-281-2/+5
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [PATCH] r/o bind mounts: monitor zeroing of i_nlinkDave Hansen2006-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Some filesystems, instead of simply decrementing i_nlink, simply zero it during an unlink operation. We need to catch these in addition to the decrement operations. Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Acked-by: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] r/o bind mount prepwork: inc_nlink() helperDave Hansen2006-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | This is mostly included for parity with dec_nlink(), where we will have some more hooks. This one should stay pretty darn straightforward for now. Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Acked-by: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] r/o bind mounts: unlink: monitor i_nlinkDave Hansen2006-10-011-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a filesystem decrements i_nlink to zero, it means that a write must be performed in order to drop the inode from the filesystem. We're shortly going to have keep filesystems from being remounted r/o between the time that this i_nlink decrement and that write occurs. So, add a little helper function to do the decrements. We'll tie into it in a bit to note when i_nlink hits zero. Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Acked-by: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] BLOCK: Remove no-longer necessary linux/buffer_head.h inclusions ↵David Howells2006-09-301-1/+0
|/ | | | | | | | | | [try #6] Remove inclusions of linux/buffer_head.h that are no longer necessary due to the transfer of a number of things out of there. Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
* [CIFS] Do not overwrite aopsDave Kleikamp2006-06-011-6/+8
| | | | | | | | | | | | 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>
* [CIFS] Support for setting up SMB sessions to legacy lanman serversSteve French2006-05-311-1/+2
|
* [CIFS] Cleanup extra whitespace in dmesg logging. Update cifs change logSteve French2006-05-311-12/+12
|
* [CIFS] [CIFS] Do not take rename sem on most path based calls (duringSteve French2006-04-211-6/+0
| | | | | | | | building of full path) to avoid hang rename/readdir hang Reported by Alan Tyson Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix typo in earlier cifs_unlink change and protect oneSteve French2006-03-311-5/+7
| | | | | | | | | extra path. Since cifs_unlink can also be called from rename path and there was one report of oops am making the extra check for null inode. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix unlink oops when indirectly called in rename error pathSteve French2006-03-311-1/+4
| | | | | | under heavy stress. Signed-off-by: Steve French <sfrench@us.ibm.com>
* Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.gitSteve French2006-03-311-11/+11
|\ | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [PATCH] 2tb-files-add-blkcnt_t-fixesAndrew Morton2006-03-261-3/+3
| | | | | | | | | | | | Cc: Takashi Sato <sho@tnes.nec.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] sem2mutex: vfs_rename_mutexArjan van de Ven2006-03-231-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | [CIFS] Workaround various server bugs found in testing at connectathonSteve French2006-03-031-2/+2
| | | | | | | | | | | | | | | | | | - slow down negprot 1ms during mount when RFC1001 over port 139 to give buggy servers time to clear sess_init - remap some plausible but incorrect SMB return codes to the right ones in truncate and hardlink paths Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] Allow fallback for setting file size to Procom SMB server whenSteve French2006-03-021-1/+1
| | | | | | | | | | | | returns error invalid level Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] Convert remaining places in fs/cifs fromEric Sesterhenn2006-02-211-2/+1
|/ | | | | | | kmalloc/memset to simpler kzalloc usage Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
* Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.gitSteve French2006-01-121-6/+5
|\ | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_semJes Sorensen2006-01-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the inode semaphore to a mutex. I have tested it on XFS and compiled as much as one can consider on an ia64. Anyway your luck with it might be different. Modified-by: Ingo Molnar <mingo@elte.hu> (finished the conversion) Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * [PATCH] Fix and add EXPORT_SYMBOL(filemap_write_and_wait)OGAWA Hirofumi2006-01-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add EXPORT_SYMBOL(filemap_write_and_wait) and use it. See mm/filemap.c: And changes the filemap_write_and_wait() and filemap_write_and_wait_range(). Current filemap_write_and_wait() doesn't wait if filemap_fdatawrite() returns error. However, even if filemap_fdatawrite() returned an error, it may have submitted the partially data pages to the device. (e.g. in the case of -ENOSPC) <quotation> Andrew Morton writes, If filemap_fdatawrite() returns an error, this might be due to some I/O problem: dead disk, unplugged cable, etc. Given the generally crappy quality of the kernel's handling of such exceptions, there's a good chance that the filemap_fdatawait() will get stuck in D state forever. </quotation> So, this patch doesn't wait if filemap_fdatawrite() returns the -EIO. Trond, could you please review the nfs part? Especially I'm not sure, nfs must use the "filemap_fdatawrite(inode->i_mapping) == 0", or not. Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [CIFS] Avoid extra large buffer allocation (and memcpy) in cifs_readpagesSteve French2005-12-121-2/+3
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] Use fsuid (fsgid) more consistently instead of uid/gid inSteve French2005-12-011-2/+2
|/ | | | | | | | | assembling smb requests when setuids and Linux protocol extensions enabled and in checking more matching sessions in multiuser mount mode. Pointed out by Shaggy. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] For previous fix, mode on mkdir needed S_IFDIR left out.Steve French2005-11-291-0/+1
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Missing parenthesis and typo in previous fixSteve French2005-11-291-1/+2
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix missing permission check on setattr when noperm mount option isSteve French2005-11-291-3/+25
| | | | | | | | | | disabled. Also set mode, uid, gid better on mkdir and create for the case when Unix Extensions is not enabled and setuids is enabled. This is necessary to fix the hole in which chown could be allowed for non-root users in some cases if root mounted, and also to display the mode and uid properly in some cases. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] When file is deleted locally but later recreated on the serverSteve French2005-11-281-8/+14
| | | | | | | | fix cifs negative dentries so they are freed faster (not requiring umount or readdir e.g.) so the client recognizes the new file on the server more quickly. Signed-off-by: Steve French <sfrench@us.ibm.com>