summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] aio: kiocb locking to serialise retry and cancelBenjamin LaHaise2005-09-091-4/+25
| | | | | | | | | | | | Implement a per-kiocb lock to serialise retry operations and cancel. This is done using wait_on_bit_lock() on the KIF_LOCKED bit of kiocb->ki_flags. Also, make the cancellation path lock the kiocb and subsequently release all references to it if the cancel was successful. This version includes a fix for the deadlock with __aio_run_iocbs. 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] change io_cancel return code for no cancel caseWendy Cheng2005-09-091-1/+1
| | | | | | | | | | | | | | | | Note that other than few exceptions, most of the current filesystem and/or drivers do not have aio cancel specifically defined (kiob->ki_cancel field is mostly NULL). However, sys_io_cancel system call universally sets return code to -EAGAIN. This gives applications a wrong impression that this call is implemented but just never works. We have customer inquires about this issue. Changed by Benjamin LaHaise to EINVAL instead of ENOSYS Signed-off-by: S. Wendy Cheng <wcheng@redhat.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] bfs: fix endianness, signedness; add trivial bugfixAndrew Stribblehill2005-09-094-70/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makes BFS code endianness-clean. * Fixes some signedness warnings. * Fixes a problem in fs/bfs/inode.c:164 where inodes not synced to disk don't get fully marked as clean. Here's how to reproduce it: # mount -o loop -t bfs /bfs.img /mnt # df -i /mnt Filesystem Inodes IUsed IFree IUse% Mounted on /bfs.img 48 1 47 3% /mnt # df -k /mnt Filesystem 1K-blocks Used Available Use% Mounted on /bfs.img 512 5 508 1% /mnt # cp 60k-archive.zip /mnt/mt.zip # df -k /mnt Filesystem 1K-blocks Used Available Use% Mounted on /bfs.img 512 65 447 13% /mnt # df -i /mnt Filesystem Inodes IUsed IFree IUse% Mounted on /bfs.img 48 2 46 5% /mnt # rm /mnt/mt.zip # echo $? 0 [If the unlink happens before the buffers flush, the following happens:] # df -i /mnt Filesystem Inodes IUsed IFree IUse% Mounted on /bfs.img 48 2 46 5% /mnt # df -k /mnt Filesystem 1K-blocks Used Available Use% Mounted on /bfs.img 512 65 447 13% /mnt fs/bfs/bfs.h | 1 Signed-off-by: Andrew Stribblehill <ads@wompom.org> Cc: <tigran@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] autofs: fix "busy inodes after umount..."Alexander Krizhanovsky2005-09-093-4/+7
| | | | | | | | | | | This patch for old autofs (version 3) cleans dentries which are not putted after killing the automount daemon (it's analogue of recent patch for autofs4). Signed-off-by: Alexander Krizhanovsky <klx@yandex.ru> Cc: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] remove the inode_post_link and inode_post_rename LSM hooksStephen Smalley2005-09-091-8/+2
| | | | | | | | | This patch removes the inode_post_link and inode_post_rename LSM hooks as they are unused (and likely useless). Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Remove security_inode_post_create/mkdir/symlink/mknod hooksStephen Smalley2005-09-091-12/+4
| | | | | | | | | | | | | | This patch removes the inode_post_create/mkdir/mknod/symlink LSM hooks as they are obsoleted by the new inode_init_security hook that enables atomic inode security labeling. If anyone sees any reason to retain these hooks, please speak now. Also, is anyone using the post_rename/link hooks; if not, those could also be removed. Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] ext3: Enable atomic inode security labelingStephen Smalley2005-09-093-0/+38
| | | | | | | | | | | This patch modifies ext3 to call the inode_init_security LSM hook to obtain the security attribute for a newly created inode and to set the resulting attribute on the new inode as part of the same transaction. This parallels the existing processing for setting ACLs on newly created inodes. Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] ext2: Enable atomic inode security labelingStephen Smalley2005-09-093-0/+35
| | | | | | | | | | | This patch modifies ext2 to call the inode_init_security LSM hook to obtain the security attribute for a newly created inode and to set the resulting attribute on the new inode. This parallels the existing processing for setting ACLs on newly created inodes. Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] update filesystems for new delete_inode behaviorMark Fasheh2005-09-0919-0/+29
| | | | | | | | | | | | | | Update the file systems in fs/ implementing a delete_inode() callback to call truncate_inode_pages(). One implementation note: In developing this patch I put the calls to truncate_inode_pages() at the very top of those filesystems delete_inode() callbacks in order to retain the previous behavior. I'm guessing that some of those could probably be optimized. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com> Acked-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] move truncate_inode_pages() into ->delete_inode()Mark Fasheh2005-09-091-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow file systems supporting ->delete_inode() to call truncate_inode_pages() on their own. OCFS2 wants this so it can query the cluster before making a final decision on whether to wipe an inode from disk or not. In some corner cases an inode marked on the local node via voting may not actually get orphaned. A good example is node death before the transaction moving the inode to the orphan dir commits to the journal. Without this patch, the truncate_inode_pages() call in generic_delete_inode() would discard valid data for such inodes. During earlier discussion in the 2.6.13 merge plan thread, Christoph Hellwig indicated that other file systems might also find this useful. IMHO, the best solution would be to just allow ->drop_inode() to do the cluster query but it seems that would require a substantial reworking of that section of the code. Assuming it is safe to call write_inode_now() in ocfs2_delete_inode() for those inodes which won't actually get wiped, this solution should get us by for now. Trivial testing of this patch (and a related OCFS2 update) has shown this to avoid the corruption I'm seeing. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com> Acked-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] bogus cast in bio.cviro@ZenIV.linux.org.uk2005-09-091-1/+1
| | | | | | <qualifier> void * is not the same as void <qualifier> *... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6 Anton Altaparmakov2005-09-091-2/+13
|\
| * [XFS] Revert recent quota Makefile change, not in a fit state for merging.Nathan Scott2005-09-091-2/+13
| | | | | | | | Signed-off-by: Nathan Scott <nathans@sgi.com>
* | Merge branch 'master' of /usr/src/linux-2.6 Anton Altaparmakov2005-09-089-59/+58
|\|
| * [XFS] Fix modular XFS builds (Makefile botch).Nathan Scott2005-09-082-5/+5
| | | | | | | | Signed-off-by: Nathan Scott <nathans@sgi.com>
| * [XFS] Remove special Kconfig XFS menu, make XFS options "inline".Nathan Scott2005-09-081-24/+21
| | | | | | | | | | Signed-off-by: Eric Sandeen <sandeen@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
| * [XFS] Cleanup some -Wundef flag warnings in the endian macros (thanksNathan Scott2005-09-086-30/+32
| | | | | | | | | | | | | | | | | | Christoph). SGI-PV: 942400 SGI-Modid: xfs-linux-melb:xfs-kern:23771a Signed-off-by: Nathan Scott <nathans@sgi.com>
* | NTFS: 2.1.24 release and some minor final fixes.Anton Altaparmakov2005-09-084-9/+9
| | | | | | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Improve scalability by changing the driver global spin lock inAnton Altaparmakov2005-09-082-6/+12
| | | | | | | | | | | | | | fs/ntfs/aops.c::ntfs_end_buffer_async_read() to a bit spin lock in the first buffer head of a page. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Fix page_has_buffers()/page_buffers() handling in fs/ntfs/aops.c.Anton Altaparmakov2005-09-082-17/+22
| | | | | | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Fixup handling of sparse, compressed, and encrypted attributes inAnton Altaparmakov2005-09-082-20/+26
| | | | | | | | | | | | fs/ntfs/aops.c::ntfs_readpage(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Fix fs/ntfs/aops.c::ntfs_{read,write}_block() to handle the caseAnton Altaparmakov2005-09-082-11/+42
| | | | | | | | | | | | where a concurrent truncate has truncated the runlist under our feet. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Optimize fs/ntfs/aops.c::ntfs_write_block() by extending the pageAnton Altaparmakov2005-09-082-10/+6
| | | | | | | | | | | | | | lock protection over the buffer submission for i/o which allows the removal of the get_bh()/put_bh() pairs for each buffer. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Fixup handling of sparse, compressed, and encrypted attributes inAnton Altaparmakov2005-09-082-57/+49
| | | | | | | | | | | | fs/ntfs/aops.c::ntfs_writepage(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Make ntfs_write_block() not instantiate sparse blocks if they are zero.Anton Altaparmakov2005-09-082-0/+23
| | | | | | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Fixup handling of sparse, compressed, and encrypted attributes inAnton Altaparmakov2005-09-082-101/+116
| | | | | | | | | | | | fs/ntfs/inode.c::ntfs_read_locked_{,attr_,index_}inode(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Truncate {a,c,m}time to the ntfs supported time granularity whenAnton Altaparmakov2005-09-082-5/+9
| | | | | | | | | | | | updating the times in the inode in ntfs_setattr(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Fix cluster (de)allocators to work when the runlist is NULL and moreAnton Altaparmakov2005-09-084-33/+32
| | | | | | | | | | | | | | importantly to take a locked runlist rather than them locking it which leads to lock reversal. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Fix handling of sparse attributes in ntfs_attr_make_non_resident().Anton Altaparmakov2005-09-082-17/+40
| | | | | | | | | | | | | | | | Also, add BUG() checks to ntfs_attr_make_non_resident() and ntfs_attr_set() to ensure that these functions are never called for compressed or encrypted attributes. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Fix several bugs in fs/ntfs/attrib.c.Anton Altaparmakov2005-09-082-1/+37
| | | | | | | | | | | | | | | | | | | | | | - Fix a bug in ntfs_map_runlist_nolock() where we forgot to protect access to the allocated size in the ntfs inode with the size lock. - Fix ntfs_attr_vcn_to_lcn_nolock() and ntfs_attr_find_vcn_nolock() to return LCN_ENOENT when there is no runlist and the allocated size is zero. - Fix load_attribute_list() to handle the case of a NULL runlist. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Add fs/ntfs/attrib.[hc]::ntfs_resident_attr_value_resize().Anton Altaparmakov2005-09-083-0/+43
| | | | | | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Remove bogus setting of PageError in ntfs_read_compressed_block().Anton Altaparmakov2005-09-083-10/+8
| | | | | | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Fix a bug in fs/ntfs/index.c::ntfs_index_lookup(). When the returnedAnton Altaparmakov2005-09-082-0/+4
| | | | | | | | | | | | | | index entry is in the index root, we forgot to set the @ir pointer in the index context. Thanks for Yura Pakhuchiy for finding this bug. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Add ntfs_rl_punch_nolock() which punches a caller specified hole into ↵Anton Altaparmakov2005-09-083-0/+289
| | | | | | | | | | | | a runlist. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Change ntfs_rl_truncate_nolock() to throw away the runlist if the newAnton Altaparmakov2005-09-082-1/+15
| | | | | | | | | | | | length is zero. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Report unrepresentable inodes during ntfs_readdir() as KERN_WARNINGAnton Altaparmakov2005-09-083-2/+7
| | | | | | | | | | | | | | messages and include the inode number. Thanks to Yura Pakhuchiy for pointing this out. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Fix handling of valid but empty mapping pairs array inAnton Altaparmakov2005-09-082-0/+5
| | | | | | | | | | | | fs/ntfs/runlist.c::ntfs_mapping_pairs_decompress(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Remove two bogus BUG_ON()s from fs/ntfs/mft.c.Anton Altaparmakov2005-09-082-2/+1
| | | | | | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Fix two nasty runlist merging bugs that had gone unnoticed so far.Anton Altaparmakov2005-09-082-2/+5
| | | | | | | | | | | | Thanks to Stefano Picerno for the bug report. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Use ntfs_malloc_nofs_nofail() in runlist.c::ntfs_runlists_merge()Anton Altaparmakov2005-09-082-18/+53
| | | | | | | | | | | | | | in the two critical regions. This means we no longer need to panic() when the allocation fails as it now cannot fail. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.Anton Altaparmakov2005-09-082-6/+48
| | | | | | | | | | | | | | | | | | | | | | - Modify fs/ntfs/malloc.h::ntfs_malloc_nofs() to do the kmalloc() based allocations with __GFP_HIGHMEM, analogous to how the vmalloc() based allocations are done. - Add fs/ntfs/malloc.h::ntfs_malloc_nofs_nofail() which is analogous to ntfs_malloc_nofs() but it performs allocations with __GFP_NOFAIL and hence cannot fail. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* | NTFS: Support more clean journal ($LogFile) states.Anton Altaparmakov2005-09-085-123/+167
|/ | | | | | | | | | | | | | | - Support journals ($LogFile) which have been modified by chkdsk. This means users can boot into Windows after we marked the volume dirty. The Windows boot will run chkdsk and then reboot. The user can then immediately boot into Linux rather than having to do a full Windows boot first before rebooting into Linux and we will recognize such a journal and empty it as it is clean by definition. - Support journals ($LogFile) with only one restart page as well as journals with two different restart pages. We sanity check both and either use the only sane one or the more recent one of the two in the case that both are valid. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6 Linus Torvalds2005-09-071-45/+182
|\
| * fix mismerge in ll_rw_blk.cJames Bottomley2005-08-281-45/+182
| |\
| | * [PATCH] Add scatter-gather support for the block layer SG_IOJames Bottomley2005-06-201-45/+105
| | | | | | | | | | | | Signed-off-by: Jens Axboe <axboe@suse.de>
| | * [PATCH] Keep the bio end_io parts inside of bio.c for blk_rq_map_kern()Jens Axboe2005-06-201-0/+11
| | | | | | | | | | | | Signed-off-by: Jens Axboe <axboe@suse.de>
| | * [PATCH] Add blk_rq_map_kern()Mike Christie2005-06-201-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add blk_rq_map_kern which takes a kernel buffer and maps it into a request and bio. This can be used by the dm hw_handlers, old sg_scsi_ioctl, and one day scsi special requests so all requests comming into scsi will have bios. All requests having bios should allow scsi to use scatter lists for all IO and allow it to use block layer functions. Signed-off-by: Jens Axboe <axboe@suse.de>
* | | Merge git://oss.sgi.com:8090/oss/git/xfs-2.6 Linus Torvalds2005-09-0752-1050/+1320
|\ \ \
| * | | [XFS] Sort out some cosmetic differences between XFS trees.Nathan Scott2005-09-058-161/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:23719a Signed-off-by: Nathan Scott <nathans@sgi.com>
| * | | [XFS] Fix incorrect use of BMAPI_READ in unwritten extent handlingNathan Scott2005-09-052-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (luckily just cosmetic). SGI-PV: 942232 SGI-Modid: xfs-linux-melb:xfs-kern:23718a Signed-off-by: Nathan Scott <nathans@sgi.com>