- 05 Feb, 2008 1 commit
-
-
Christoph Lameter authored
Simplify page cache zeroing of segments of pages through 3 functions zero_user_segments(page, start1, end1, start2, end2) Zeros two segments of the page. It takes the position where to start and end the zeroing which avoids length calculations and makes code clearer. zero_user_segment(page, start, end) Same for a single segment. zero_user(page, start, length) Length variant for the case where we know the length. We remove the zero_user_page macro. Issues: 1. Its a macro. Inline functions are preferable. 2. The KM_USER0 macro is only defined for HIGHMEM. Having to treat this special case everywhere makes the code needlessly complex. The parameter for zeroing is always KM_USER0 except in one single case that we open code. Avoiding KM_USER0 makes a lot of code not having to be dealing with the special casing for HIGHMEM anymore. Dealing with kmap is only necessary for HIGHMEM configurations. In those configurations we use KM_USER0 like we do for a series of other functions defined in highmem.h. Since KM_USER0 is depends on HIGHMEM the existing zero_user_page function could not be a macro. zero_user_* functions introduced here can be be inline because that constant is not used when these functions are called. Also extract the flushing of the caches to be outside of the kmap. [akpm@linux-foundation.org: fix nfs and ntfs build] [akpm@linux-foundation.org: fix ntfs build some more] Signed-off-by:
Christoph Lameter <clameter@sgi.com> Cc: Steven French <sfrench@us.ibm.com> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Cc: <linux-ext4@vger.kernel.org> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Anton Altaparmakov <aia21@cantab.net> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: David Chinner <dgc@sgi.com> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Cc: Steven French <sfrench@us.ibm.com> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 08 Jan, 2008 1 commit
-
-
Steve French authored
Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 31 Dec, 2007 1 commit
-
-
Steve French authored
Requires cifsacl mount flag to be on and CIFS_EXPERIMENTAL enabled CC: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 20 Nov, 2007 1 commit
-
-
Jeff Layton authored
Fix RedHat bug 329431 The idea here is separate "conscious" from "unconscious" flushes. Conscious flushes are those due to a fsync() or close(). Unconscious ones are flushes that occur as a side effect of some other operation or due to memory pressure. Currently, when an error occurs during an unconscious flush (ENOSPC or EIO), we toss out the page and don't preserve that error to report to the user when a conscious flush occurs. If after the unconscious flush, there are no more dirty pages for the inode, the conscious flush will simply return success even though there were previous errors when writing out pages. This can lead to data corruption. The easiest way to reproduce this is to mount up a CIFS share that's very close to being full or where the user is very close to quota. mv a file to the share that's slightly larger than the quota allows. The writes will all succeed (since they go to pagecache). The mv will do a setattr to set the new file's attributes. This calls filemap_write_and_wait, which will return an error since all of the pages can't be written out. Then later, when the flush and release ops occur, there are no more dirty pages in pagecache for the file and those operations return 0. mv then assumes that the file was written out correctly and deletes the original. CIFS already has a write_behind_rc variable where it stores the results from earlier flushes, but that value is only reported in cifs_close. Since the VFS ignores the return value from the release operation, this isn't helpful. We should be reporting this error during the flush operation. This patch does the following: 1) changes cifs_fsync to use filemap_write_and_wait and cifs_flush and also sync to check its return code. If it returns successful, they then check the value of write_behind_rc to see if an earlier flush had reported any errors. If so, they return that error and clear write_behind_rc. 2) sets write_behind_rc in a few other places where pages are written out as a side effect of other operations and the code waits on them. 3) changes cifs_setattr to only call filemap_write_and_wait for ATTR_SIZE changes. 4) makes cifs_writepages accurately distinguish between EIO and ENOSPC errors when writing out pages. Some simple testing indicates that the patch works as expected and that it fixes the reproduceable known problem. Acked-by:
Dave Kleikamp <shaggy@austin.rr.com> Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 30 Oct, 2007 1 commit
-
-
Steve French authored
We were requesting GENERIC_READ but that fails when we do not have read permission on the file (even if we could read the ACL). Also move the dump access control entry code into debug ifdef. Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 25 Oct, 2007 1 commit
-
-
Steve French authored
Acked-by:
Shirish Pargaonkar <shirishp@us.ibm.com> CC: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 19 Oct, 2007 1 commit
-
-
Steve French authored
Acked-by:
Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 18 Oct, 2007 1 commit
-
-
Jeff Layton authored
If the ATTR_KILL_S*ID bits are set then any mode change is only for clearing the setuid/setgid bits. For CIFS, skip the mode change and let the server handle it. Signed-off-by:
Jeff Layton <jlayton@redhat.com> Cc: Steven French <sfrench@us.ibm.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 14 Oct, 2007 1 commit
-
-
Cyril Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 28 Sep, 2007 1 commit
-
-
Steve French authored
This allows cifs to mount to ipc shares (IPC$) which will allow user space applications to layer over authenticated cifs connections (useful for Wine and others that would want to put DCE/RPC over CIFS or run CIFS named pipes) Acked-by:
Rob Shearman <rob@codeweavers.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 16 Sep, 2007 2 commits
-
-
Steve French authored
posix ops Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
Steve French authored
There is a small memory leak in fs/cifs/inode.c::cifs_mkdir(). Storage for 'pInfo' is allocated with kzalloc(), but if the call to CIFSPOSIXCreate(...) happens to return 0 and pInfo->Type == -1, then we'll jump to the 'mkdir_get_info' label without freeing the storage allocated for 'pInfo'. This patch adds a kfree() call to free the storage just before jumping to the label, thus getting rid of the leak. Signed-off-by:
Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 13 Sep, 2007 1 commit
-
-
Jeff authored
When making a directory with POSIX mkdir calls, cifs_mkdir does not respect the umask. This patch causes the new POSIX mkdir to create with the right mode Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 30 Aug, 2007 1 commit
-
-
Steve French authored
Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 22 Aug, 2007 1 commit
-
-
Steve French authored
vmtruncate had added the same fix to handle the case of private pages being Copy on writed while truncate_inode_pages is going on Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 18 Jul, 2007 1 commit
-
-
Steve French authored
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>
-
- 16 Jul, 2007 2 commits
-
-
Steve French authored
Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
Eric authored
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>
-
- 14 Jul, 2007 1 commit
-
-
Steve French authored
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>
-
- 12 Jul, 2007 1 commit
-
-
Steve French authored
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>
-
- 09 Jul, 2007 1 commit
-
-
Steve French authored
More than halfway there Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 08 Jun, 2007 1 commit
-
-
Steve French authored
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>
-
- 30 Apr, 2007 1 commit
-
-
Steve French authored
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>
-
- 25 Apr, 2007 1 commit
-
-
Steve French authored
Fix incorrect parsing of return data Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 23 Apr, 2007 1 commit
-
-
Steve French authored
Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 06 Apr, 2007 1 commit
-
-
Steve French authored
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>
-
- 22 Mar, 2007 1 commit
-
-
Steve French authored
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>
-
- 09 Mar, 2007 1 commit
-
-
Alan Tyson authored
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>
-
- 26 Feb, 2007 3 commits
-
-
Steve French authored
Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
Steve French authored
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>
-
Steve French authored
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>
-
- 16 Feb, 2007 1 commit
-
-
Steve French authored
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>
-
- 14 Feb, 2007 1 commit
-
-
Steve French authored
Thanks to Dirk for pointing this out. Signed-off-by:
Dirk Mueller <dmueller@suse.de> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 08 Feb, 2007 1 commit
-
-
Steve French authored
Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 16 Nov, 2006 1 commit
-
-
Steve French authored
We were adjusting for timezone on readdir but not on stat Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 07 Nov, 2006 1 commit
-
-
Steve French authored
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>
-
- 01 Nov, 2006 1 commit
-
-
Steve French authored
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>
-
- 11 Oct, 2006 1 commit
-
-
Steve French authored
Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- 01 Oct, 2006 2 commits
-
-
Dave Hansen authored
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>
-
Dave Hansen authored
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>
-