aboutsummaryrefslogtreecommitdiff
path: root/fs/ocfs2/alloc.c
AgeCommit message (Collapse)AuthorFilesLines
2007-04-26ocfs2: zero tail of sparse files on truncateMark Fasheh1-0/+224
Since we don't zero on extend anymore, truncate needs to be fixed up to zero the part of a file between i_size and and end of it's cluster. Otherwise a subsequent extend could expose bad data. This introduced a new helper, which can be used in ocfs2_write(). Signed-off-by: Mark Fasheh <[email protected]>
2007-04-26ocfs2: teach extend/truncate about sparse filesMark Fasheh1-189/+291
For ocfs2_truncate_file(), we eliminate the "simple" truncate case which no longer exists since i_size is not tied to i_clusters. In ocfs2_extend_file(), we skip the allocation / page zeroing code for file systems which understand sparse files. The core truncate code is changed to do a bottom up tree traversal. This gets abstracted out into it's own function. To make things more readable, most of the special case handling for in-inode extents from ocfs2_do_truncate() is also removed. Though write support for sparse files comes in a later patch, we at least update ocfs2_prepare_inode_for_write() to skip allocation for sparse files. Signed-off-by: Mark Fasheh <[email protected]>
2007-04-26ocfs2: temporarily remove extent map cachingMark Fasheh1-3/+2
The code in extent_map.c is not prepared to deal with a subtree being rotated between lookups. This can happen when filling holes in sparse files. Instead of a lengthy patch to update the code (which would likely lose the benefit of caching subtree roots), we remove most of the algorithms and implement a simple path based lookup. A less ambitious extent caching scheme will be added in a later patch. Signed-off-by: Mark Fasheh <[email protected]>
2007-04-26ocfs2: sparse b-tree supportMark Fasheh1-483/+1963
Introduce tree rotations into the b-tree code. This will allow ocfs2 to support sparse files. Much of the added code is designed to be generic (in the ocfs2 sense) so that it can later be re-used to implement large extended attributes. This patch only adds the rotation code and does minimal updates to callers of the extent api. Signed-off-by: Mark Fasheh <[email protected]>
2006-12-13[PATCH] Fix numerous kcalloc() calls, convert to kzalloc()Robert P. J. Day1-1/+1
All kcalloc() calls of the form "kcalloc(1,...)" are converted to the equivalent kzalloc() calls, and a few kcalloc() calls with the incorrect ordering of the first two arguments are fixed. Signed-off-by: Robert P. J. Day <[email protected]> Cc: Jeff Garzik <[email protected]> Cc: Alan Cox <[email protected]> Cc: Dominik Brodowski <[email protected]> Cc: Adam Belay <[email protected]> Cc: James Bottomley <[email protected]> Cc: Greg KH <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Trond Myklebust <[email protected]> Cc: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-12-05Merge branch 'master' of ↵David Howells1-51/+39
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: drivers/ata/libata-scsi.c include/linux/libata.h Futher merge of Linus's head and compilation fixups. Signed-Off-By: David Howells <[email protected]>
2006-12-01ocfs2: Remove struct ocfs2_journal_handle in favor of handle_tMark Fasheh1-16/+16
This is mostly a search and replace as ocfs2_journal_handle is now no more than a container for a handle_t pointer. ocfs2_commit_trans() becomes very straight forward, and we remove some out of date comments / code. Signed-off-by: Mark Fasheh <[email protected]>
2006-12-01ocfs2: remove handle argument to ocfs2_start_trans()Mark Fasheh1-4/+3
All callers either pass in NULL directly, or a local variable that is already set to NULL. The internals of ocfs2_start_trans() get a nice cleanup as a result. Signed-off-by: Mark Fasheh <[email protected]>
2006-12-01ocfs2: pass ocfs2_super * into ocfs2_commit_trans()Mark Fasheh1-4/+4
This sets us up to remove handle->journal. Signed-off-by: Mark Fasheh <[email protected]>
2006-12-01ocfs2: remove unused handle argument from ocfs2_meta_lock_full()Mark Fasheh1-5/+2
Now that this is unused and all callers pass NULL, we can safely remove it. Signed-off-by: Mark Fasheh <[email protected]>
2006-12-01ocfs2: don't pass handle to ocfs2_meta_lock() in __ocfs2_flush_truncate_log()Mark Fasheh1-27/+19
Take and drop the locks directly. Signed-off-by: Mark Fasheh <[email protected]>
2006-12-01ocfs2: have ocfs2_extend_trans() take handle_tMark Fasheh1-1/+1
No reason to use our wrapper struct in this function, so take the handle_t directly. Also fixes a bug where we were incorrectly setting the handle to NULL in case of a failure from journal_restart() Signed-off-by: Mark Fasheh <[email protected]>
2006-11-22WorkStruct: make allyesconfigDavid Howells1-3/+6
Fix up for make allyesconfig. Signed-Off-By: David Howells <[email protected]>
2006-09-20ocfs2: Remove overzealous BUG_ON()Mark Fasheh1-8/+20
The truncate code was never supposed to BUG() on an allocator it doesn't know about, but rather to ignore it. Right now, this does nothing, but when we change our allocation paths to use all suballocator files, this will allow current versions of the fs module to work fine. Signed-off-by: Mark Fasheh <[email protected]>
2006-03-24ocfs2: don't use MLF* in the file systemMark Fasheh1-43/+45
Signed-off-by: Mark Fasheh <[email protected]>
2006-01-09[PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_semJes Sorensen1-12/+12
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 <[email protected]> (finished the conversion) Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2006-01-03[PATCH] OCFS2: The Second Oracle Cluster FilesystemMark Fasheh1-0/+2040
The OCFS2 file system module. Signed-off-by: Mark Fasheh <[email protected]> Signed-off-by: Kurt Hackel <[email protected]>