summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* NTFS: Fix serious data corruption issue when writing.Anton Altaparmakov2005-10-191-0/+1
| | | | | | | Many thanks to Alberto Patino for testing and reporting the data corruption. And many apologies for corrupting his partition. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: $EA attributes can be both resident non-resident.Anton Altaparmakov2005-10-195-14/+35
| | | | | | Minor tidying. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* Merge branch 'master' of /usr/src/ntfs-2.6/Anton Altaparmakov2005-10-195-33/+10
|\
| * [PATCH] aio: revert lock_kiocb()Zach Brown2005-10-171-25/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lock_kiocb() was introduced to serialize retrying and cancellation. In the process of doing so it tried to sleep waiting for KIF_LOCKED while holding the ctx_lock spinlock. Recent fixes have ensured that multiple concurrent retries won't be attempted for a given iocb. Cancel has other problems and has no significant in-tree users that have been complaining about it. So for the immediate future we'll revert sleeping with the lock held and will address proper cancellation and retry serialization in the future. Signed-off-by: Zach Brown <zach.brown@oracle.com> Acked-by: Benjamin LaHaise <bcrl@kvack.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] output of /proc/maps on nommu systems is incompleteDavid McCullough2005-10-171-0/+1
| | | | | | | | | | | | | | | | | | Currently you do not get all the map entries on nommu systems because the start function doesn't index into the list using the value of "pos". Signed-off-by: David McCullough <davidm@snapgear.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] NFS: Fix Oopsable/unnecessary i_count manipulations in ↵Trond Myklebust2005-10-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | nfs_wait_on_inode() Oopsable since nfs_wait_on_inode() can get called as part of iput_final(). Unnecessary since the caller had better be damned sure that the inode won't disappear from underneath it anyway. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] NFS: Fix cache consistency racesTrond Myklebust2005-10-173-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | If the data cache has been marked as potentially invalid by nfs_refresh_inode, we should invalidate it rather than assume that changes are due to our own activity. Also ensure that we always start with a valid cache before declaring it to be protected by a delegation. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | Merge branch 'master' of /usr/src/ntfs-2.6/Anton Altaparmakov2005-10-174-117/+81
|\|
| * [PATCH] nommu build error fixYoshinori Sato2005-10-141-0/+12
| | | | | | | | | | | | | | | | "proc_smaps_operations" is not defined in case of "CONFIG_MMU=n". Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] binfmt_elf bss padding fixakpm@osdl.org2005-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nir Tzachar <tzachar@cs.bgu.ac.il> points out that if an ELF file specifies a zero-length bss at a whacky address, we cannot load that binary because padzero() tries to zero out the end of the page at the whacky address, and that may not be writeable. See also http://bugzilla.kernel.org/show_bug.cgi?id=5411 So teach load_elf_binary() to skip the bss settng altogether if the elf file has a zero-length bss segment. Cc: Roland McGrath <roland@redhat.com> Cc: Daniel Jacobowitz <dan@debian.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] nfsacl: Solaris VxFS compatibility fixAndreas Gruenbacher2005-10-111-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here is a compatibility fix between Linux and Solaris when used with VxFS filesystems: Solaris usually accepts acl entries in any order, but with VxFS it replies with NFSERR_INVAL when it sees a four-entry acl that is not in canonical form. It may also fail with other non-canonical acls -- I can't tell, because that case never triggers: We only send non-canonical acls when we fake up an ACL_MASK entry. Instead of adding fake ACL_MASK entries at the end, inserting them in the correct position makes Solaris+VxFS happy. The Linux client and server sides don't care about entry order. The three-entry-acl special case in which we need a fake ACL_MASK entry was handled in xdr_nfsace_encode. The patch moves this into nfsacl_encode. Signed-off-by: Andreas Gruenbacher <agruen@suse.de> 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>
| * [PATCH] v9fs: remove additional buffer allocation from v9fs_file_read and ↵Latchesar Ionkov2005-10-111-81/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v9fs_file_write v9fs_file_read and v9fs_file_write use kmalloc to allocate buffers as big as the data buffer received as parameter. kmalloc cannot be used to allocate buffers bigger than 128K, so reading/writing data in chunks bigger than 128k fails. This patch reorganizes v9fs_file_read and v9fs_file_write to allocate only buffers as big as the maximum data that can be sent in one 9P message. Signed-off-by: Latchesar Ionkov <lucho@ionkov.net> Cc: Eric Van Hensbergen <ericvh@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | NTFS: The big ntfs write(2) rewrite has arrived. We now implement our ownAnton Altaparmakov2005-10-113-45/+2242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | file operations ->write(), ->aio_write(), and ->writev() for regular files. This replaces the old use of generic_file_write(), et al and the address space operations ->prepare_write and ->commit_write. This means that both sparse and non-sparse (unencrypted and uncompressed) files can now be extended using the normal write(2) code path. There are two limitations at present and these are that we never create sparse files and that we only have limited support for highly fragmented files, i.e. ones whose data attribute is split across multiple extents. When such a case is encountered, EOPNOTSUPP is returned. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Remove address space operations ->prepare_write and ->commit_write inAnton Altaparmakov2005-10-111-827/+0
| | | | | | | | | | | | preparation for the big rewrite of write(2) support in ntfs. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: In attrib.c::ntfs_attr_set() call balance_dirty_pages_ratelimited()Anton Altaparmakov2005-10-113-2/+9
| | | | | | | | | | | | | | | | and cond_resched() in the main loop as we could be dirtying a lot of pages and this ensures we play nice with the VM and the system as a whole. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | Merge branch 'master' of /usr/src/ntfs-2.6/Anton Altaparmakov2005-10-1111-41/+58
|\|
| * [PATCH] relayfs: fix bogus param value in call to vmapTom Zanussi2005-10-101-1/+1
| | | | | | | | | | | | | | | | | | The third param in this call to vmap shouldn't be GFP_KERNEL, which makes no sense, but rather VM_MAP. Thanks to Al Viro for spotting this. Signed-off-by: Tom Zanussi <zanussi@us.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] gfp flags annotations - part 1Al Viro2005-10-087-23/+22
| | | | | | | | | | | | | | | | | | | | | | | | - added typedef unsigned int __nocast gfp_t; - replaced __nocast uses for gfp flags with gfp_t - it gives exactly the same warnings as far as sparse is concerned, doesn't change generated code (from gcc point of view we replaced unsigned int with typedef) and documents what's going on far better. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * Avoid 'names_cache' memory leak with CONFIG_AUDITSYSCALLLinus Torvalds2005-10-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nameidata "last.name" is always allocated with "__getname()", and should always be free'd with "__putname()". Using "putname()" without the underscores will leak memory, because the allocation will have been hidden from the AUDITSYSCALL code. Arguably the real bug is that the AUDITSYSCALL code is really broken, but in the meantime this fixes the problem people see. Reported by Robert Derr, patch by Rick Lindsley. Acked-by: Al Viro <viro@ftp.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] bfs iget() abusesAl Viro2005-10-041-12/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfs_fill_super() walks the inode table to get the bitmap of free inodes and collect stats. It has no business using iget() for that - it's a lot of extra work, extra icache pollution and more complex code. Switched to walking the damn thing directly. Note: that also allows to kill ->i_dsk_ino in there - separate patch if Tigran can confirm that this field can be zero only for deleted inodes (i.e. something that could only be found during that scan and not by normal lookups). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] bfs endianness annotationsAlexey Dobriyan2005-10-042-2/+2
| | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | NTFS: Enable ATTR_SIZE attribute changes in ntfs_setattr(). This completesAnton Altaparmakov2005-10-042-8/+22
| | | | | | | | | | | | | | | | | | | | | | the initial implementation of file truncation. Now both open(2)ing a file with the O_TRUNC flag and the {,f}truncate(2) system calls will resize a file appropriately. The limitations are that only uncompressed and unencrypted files are supported. Also, there is only very limited support for highly fragmented files (the ones whose $DATA attribute is split into multiple attribute extents). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Implement fs/ntfs/inode.[hc]::ntfs_truncate(). It only supportsAnton Altaparmakov2005-10-042-43/+468
| | | | | | | | | | | | uncompressed and unencrypted files. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Add fs/ntfs/attrib.[hc]::ntfs_attr_extend_allocation(), a function toAnton Altaparmakov2005-10-043-0/+640
| | | | | | | | | | | | | | extend the allocation of an attributes. Optionally, the data size, but not the initialized size can be extended, too. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Fix ntfs_attr_make_non_resident() to update the vfs inode i_blocksAnton Altaparmakov2005-10-042-1/+7
| | | | | | | | | | | | | | | | which is zero for a resident attribute but should no longer be zero once the attribute is non-resident as it then has real clusters allocated. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Change ntfs_attr_make_non_resident to take the attribute value sizeAnton Altaparmakov2005-10-043-4/+17
| | | | | | | | | | | | | | | | | | | | as an extra parameter. This is needed since we need to know the size before we can map the mft record and our callers always know it. The reason we cannot simply read the size from the vfs inode i_size is that this is not necessarily uptodate. This happens when ntfs_attr_make_non_resident() is called in the ->truncate call path. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: - Change ntfs_cluster_alloc() to take an extra boolean parameterAnton Altaparmakov2005-10-045-15/+25
| | | | | | | | | | | | | | | | | | | | specifying whether the cluster are being allocated to extend an attribute or to fill a hole. - Change ntfs_attr_make_non_resident() to call ntfs_cluster_alloc() with @is_extension set to TRUE and remove the runlist terminator fixup code as this is now done by ntfs_cluster_alloc(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: - Change {__,}ntfs_cluster_free() to also take an optional attributeAnton Altaparmakov2005-10-044-19/+86
| | | | | | | | | | | | | | | | | | | | search context as argument. This allows calling it with the mft record mapped. Update all callers. - Fix potential deadlock in ntfs_mft_data_extend_allocation_nolock() error handling by passing in the active search context when calling ntfs_cluster_free(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Change ntfs_attr_find_vcn_nolock() to also take an optional attributeAnton Altaparmakov2005-10-045-44/+59
| | | | | | | | | | | | | | search context as argument. This allows calling it with the mft record mapped. Update all callers. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Change ntfs_map_runlist_nolock() to also take an optional attributeAnton Altaparmakov2005-10-044-33/+209
|/ | | | | | search context. This allows calling it with the mft record mapped. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Fix a 64-bitness bug where a left-shift could overflow a 32-bit variableAnton Altaparmakov2005-10-043-3/+4
| | | | | | which we now cast to 64-bit first (fs/ntfs/mft.c::map_mft_record_page(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Fix a stupid bug in __ntfs_bitmap_set_bits_in_run() which caused theAnton Altaparmakov2005-10-042-2/+6
| | | | | | | count to become negative and hence we had a wild memset() scribbling all over the system's ram. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* [PATCH] fuse: check O_DIRECTMiklos Szeredi2005-09-301-0/+4
| | | | | | | | | | | | | Check O_DIRECT and return -EINVAL error in open. dentry_open() also checks this but only after the open method is called. This patch optimizes away the unnecessary upcalls in this case. It could be a correctness issue too: if filesystem has open() with side effect, then it should fail before doing the open, not after. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] uml: remove empty hostfs_truncate methodPaolo 'Blaisorblade' Giarrusso2005-09-301-7/+0
| | | | | | | | | | | | | | | | | | | | Calling truncate() on hostfs spits a kernel warning "Something isn't implemented here", but it still works fine. Indeed, hostfs i_op->truncate doesn't do anything. But hostfs_setattr() -> set_attr() correctly detects ATTR_SIZE and calls truncate() on the host. So we should be safe (using ftruncate() may be better, in case the file is unlinked on the host, but we aren't sure to have the file open for writing, and reopening it would cause the same races; plus nobody should expect UML to be so careful). So, the warning is wrong, because the current implementation is working. Al, am I correct, and can the warning be therefore dropped? CC: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] aio: avoid extra aio_{read,write} call when ki_left == 0Zach Brown2005-09-301-2/+2
| | | | | | | | | | | | Recently aio_p{read,write} changed to perform retries internally rather than returning -EIOCBRETRY. This inadvertantly resulted in always calling aio_{read,write} with ki_left at 0 which would in turn immediately return 0. Harmless, but we can avoid this call by checking in the caller. Signed-off-by: Zach Brown <zach.brown@oracle.com> Signed-off-by: Benjamin LaHaise <bcrl@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] aio: remove unlocked task_list test and resulting raceZach Brown2005-09-301-46/+33
| | | | | | | | | | | | | | | | | | | | | | Only one of the run or kick path is supposed to put an iocb on the run list. If both of them do it than one of them can end up referencing a freed iocb. The kick path could delete the task_list item from the wait queue before getting the ctx_lock and putting the iocb on the run list. The run path was testing the task_list item outside the lock so that it could catch ki_retry methods that return -EIOCBRETRY *without* putting the iocb on a wait queue and promising to call kick_iocb. This unlocked check could then race with the kick path to cause both to try and put the iocb on the run list. The patch stops the run path from testing task_list by requring that any ki_retry that returns -EIOCBRETRY *must* guarantee that kick_iocb() will be called in the future. aio_p{read,write}, the only in-tree -EIOCBRETRY users, are updated. Signed-off-by: Zach Brown <zach.brown@oracle.com> Signed-off-by: Benjamin LaHaise <bcrl@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] aio: lock around kiocbTryKick()Zach Brown2005-09-301-7/+12
| | | | | | | | | | | | | | | | | | Only one of the run or kick path is supposed to put an iocb on the run list. If both of them do it than one of them can end up referencing a freed iocb. The kick patch could set the Kicked bit before acquiring the ctx_lock and putting the iocb on the run list. The run path, while holding the ctx_lock, could see this partial kick and mistake it for a kick that was deferred while it was doing work with the run_list NULLed out. It would then race with the kick thread to add the iocb to the run list. This patch moves the kick setting under the ctx_lock so that only one of the kick or run path queues the iocb on the run list, as intended. Signed-off-by: Zach Brown <zach.brown@oracle.com> Signed-off-by: Benjamin LaHaise <bcrl@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] missing ERR_PTR in 9fsAl Viro2005-09-301-1/+1
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] readv/writev syscalls are not checked by lsmKostik Belousov2005-09-291-0/+3
| | | | | | | | | | | | | | it seems that readv(2)/writev(2) syscalls do not call file_permission callback. Looks like this is overlook. I have filled the issue into redhat bugzilla as https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=169433 and got the recommendation to post this on lsm mailing list. The following trivial patch solves the problem. Signed-off-by: Kostik Belousov <kostikbel@gmail.com> Signed-off-by: Chris Wright <chrisw@osdl.org>
* [PATCH] epoll: handle timeout overflowDavide Libenzi2005-09-281-2/+6
| | | | | | | | Handle the timeout upper boundary for epoll. Signed-off-by: Davide Libenzi <davidel@xmailserver.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] v9fs: fix races in fid allocationLatchesar Ionkov2005-09-287-196/+200
| | | | | | | | | | | | | | | | | | | | Fid management cleanup. The patch attempts to fix the races in dentry's fid management. Dentries don't keep the opened fids anymore, they are moved to the file structs. Ideally there should be no more than one fid with fidcreate equal to zero in the dentry's list of fids. v9fs_fid_create initializes the important fields (fid, fidcreated) before v9fs_fid is added to the list. v9fs_fid_lookup returns only fids that are not created by v9fs_create. v9fs_fid_get_created returns the fid created by the same process by v9fs_create (if any) and removes it from dentry's list Signed-off-by: Latchesar Ionkov <lucho@ionkov.net> Cc: Eric Van Hensbergen <ericvh@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Fix ext3_new_inode() failure pathsChris Sykes2005-09-281-15/+14
| | | | | | | | | | | Fix failure paths in ext3_new_inode() and clean up duplicated code: - DQUOT_DROP() was not being called if ext3_init_security() failed. Signed-off-by: Chris Sykes <chris@sigsegv.plus.com> Cc: Stephen Smalley <sds@epoch.ncsc.mil> Cc: Jan Kara <jack@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Fix ext2_new_inode() failure pathsChris Sykes2005-09-281-12/+13
| | | | | | | | | | | Fix failure paths in ext2_new_inode() and clean up duplicated code: - DQUOT_DROP() was not being called if ext2_init_security() failed. Signed-off-by: Chris Sykes <chris@sigsegv.plus.com> Cc: Stephen Smalley <sds@epoch.ncsc.mil> Cc: Jan Kara <jack@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fuse: check reserved node ID valuesMiklos Szeredi2005-09-281-0/+6
| | | | | | | | | This patch checks reserved node ID values returned by lookup and creation operations. In case one of the reserved values is sent, return -EIO. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fuse: add required version infoMiklos Szeredi2005-09-281-0/+3
| | | | | | | | | | | | Add information about required version of the userspace library/utilities to Documentation/Changes. Also add pointer to this and to FUSE documentation from Kconfig. Thanks to Anton Altaparmakov for the reminder. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* NTFS: Re-fix sparse warnings in a more correct way, i.e. don't use an enum withAnton Altaparmakov2005-09-261-8/+5
| | | | | | different types in it but #define the two constants instead. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* Merge branch 'master' of /home/src/linux-2.6/Anton Altaparmakov2005-09-2615-116/+138
|\
| * [PATCH] cifs: Add support for suspendSteve French2005-09-232-0/+4
| | | | | | | | | | | | | | | | cifsd had been preventing software suspend from completing. Signed-off-by: pavel@suse.de Signed-off-by: Steve French <sfrench@us.ibm.com> lightly modified Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * Merge branch 'for-linus' of ↵Linus Torvalds2005-09-234-7/+14
| |\ | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/shaggy/jfs-2.6
| | * JFS: don't dereference tlck->ip from txUpdateMapDave Kleikamp2005-09-202-1/+9
| | | | | | | | | | | | | | | | | | The inode pointer may no longer be valid Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>