aboutsummaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAge
...
| * | | ocfs2: Basic tree root operation.Tao Ma2009-09-22
| | | | | | | | | | | | | | | | | | | | | | | | Add basic refcount tree root operation. Signed-off-by: Tao Ma <tao.ma@oracle.com>
| * | | ocfs2: Add refcount tree lock mechanism.Tao Ma2009-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement locking around struct ocfs2_refcount_tree. This protects all read/write operations on refcount trees. ocfs2_refcount_tree has its own lock and its own caching_info, protecting buffers among multiple nodes. User must call ocfs2_lock_refcount_tree before his operation on the tree and unlock it after that. ocfs2_refcount_trees are referenced by the block number of the refcount tree root block, So we create an rb-tree on the ocfs2_super to look them up. Signed-off-by: Tao Ma <tao.ma@oracle.com>
| * | | ocfs2: Add caching info for refcount tree.Tao Ma2009-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | refcount tree should use its own caching info so that when we downconvert the refcount tree lock, we can drop all the cached buffer head. Signed-off-by: Tao Ma <tao.ma@oracle.com>
| * | | ocfs2: Add new refcount tree lock resource in dlmglue.Tao Ma2009-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | refcount tree lock resource is used to protect refcount tree read/write among multiple nodes. Signed-off-by: Tao Ma <tao.ma@oracle.com>
| * | | ocfs2: Abstract caching info checkpoint.Tao Ma2009-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In meta downconvert, we need to checkpoint the metadata in an inode. For refcount tree, we also need it. So abstract the process out. Signed-off-by: Tao Ma <tao.ma@oracle.com>
| * | | ocfs2: Add ocfs2_read_refcount_block.Tao Ma2009-09-22
| | | | | | | | | | | | | | | | Signed-off-by: Tao Ma <tao.ma@oracle.com>
| * | | ocfs2: Add metaecc for ocfs2_refcount_block.Tao Ma2009-09-22
| | | | | | | | | | | | | | | | | | | | | | | | Add metaecc and journal trigger for ocfs2_refcount_block. Signed-off-by: Tao Ma <tao.ma@oracle.com>
| * | | ocfs2: Define refcount tree structure.Tao Ma2009-09-22
| | | | | | | | | | | | | | | | Signed-off-by: Tao Ma <tao.ma@oracle.com>
| * | | ocfs2: Pass ocfs2_caching_info into ocfs_init_*_extent_tree().Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With this commit, extent tree operations are divorced from inodes and rely on ocfs2_caching_info. Phew! Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: __ocfs2_mark_extent_written() doesn't need struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We only allow unwritten extents on data, so the toplevel ocfs2_mark_extent_written() can use an inode all it wants. But the subfunction isn't even using the inode argument. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Teach ocfs2_replace_extent_rec() to use an extent_tree.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | Don't use a struct inode anymore. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_split_and_insert() no longer needs struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | It already has an extent_tree. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_remove_extent() no longer needs struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | One more generic btree function that is isolated from struct inode. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_add_clusters_in_btree() no longer needs struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | One more function that doesn't need a struct inode to pass to its children. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_insert_extent() no longer needs struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | One more function down, no inode in the entire insert-extent chain. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Make extent map insertion an extent_tree_operation.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ocfs2_insert_extent() wants to insert a record into the extent map if it's an inode data extent. But since many btrees can call that function, let's make it an op on ocfs2_extent_tree. Other tree types can leave it empty. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_figure_insert_type() no longer needs struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | It's not using it, so remove it from the parameter list. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Remove inode from ocfs2_figure_extent_contig().Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | It already has an ocfs2_extent_tree and doesn't need the inode. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Swap inode for extent_tree in ocfs2_figure_merge_contig_type().Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | We don't want struct inode in generic btree operations. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_extent_contig() only requires the superblock.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't pass the inode in. We don't want it around for generic btree operations. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_do_insert_extent() and ocfs2_insert_path() no longer need an inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | They aren't using it, so remove it from their parameter lists. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Give ocfs2_split_record() an extent_tree instead of an inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | Another on the way to generic btree functions. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_insert_at_leaf() doesn't need struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | Give it an ocfs2_extent_tree and it is happy. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Make truncating the extent map an extent_tree_operation.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ocfs2_remove_extent() wants to truncate the extent map if it's truncating an inode data extent. But since many btrees can call that function, let's make it an op on ocfs2_extent_tree. Other tree types can leave it empty. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_truncate_rec() doesn't need struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | It's not using it anymore. Remove it from the parameter list. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_grow_branch() and ocfs2_append_rec_to_path() lose struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ocfs2_grow_branch() not really using it other than to pass it to the subfunctions ocfs2_shift_tree_depth(), ocfs2_find_branch_target(), and ocfs2_add_branch(). The first two weren't it either, so they drop the argument. ocfs2_add_branch() only passed it to ocfs2_adjust_rightmost_branch(), which drops the inode argument and uses the ocfs2_extent_tree as well. ocfs2_append_rec_to_path() can be take an ocfs2_extent_tree instead of the inode. The function ocfs2_adjust_rightmost_records() goes along for the ride. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_try_to_merge_extent() doesn't need struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | It's not using it, so remove it from the parameter list. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_merge_rec_left/right() no longer need struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | Drop it from the parameters - they already have ocfs2_extent_list. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_rotate_tree_left() no longer needs struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It already gets ocfs2_extent_tree, so we can just use that. This chains to the same modification for ocfs2_remove_rightmost_path() and ocfs2_rotate_rightmost_leaf_left(). Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: __ocfs2_rotate_tree_left() doesn't need struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It already has struct ocfs2_extent_tree, which has the caching info. So we don't need to pass it struct inode. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_rotate_subtree_left() doesn't need struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It already has struct ocfs2_extent_tree, which has the caching info. So we don't need to pass it struct inode. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_update_edge_lengths() doesn't need struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | Pass in the extent tree, which is all we need. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_rotate_tree_right() doesn't need struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | We don't need struct inode in ocfs2_rotate_tree_right() anymore. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Drop struct inode from ocfs2_extent_tree_operations.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We can get to the inode from the caching information. Other parent types don't need it. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Pass ocfs2_extent_tree to ocfs2_get_subtree_root()Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of the inode argument. Use extent_tree instead. This means a few more functions have to pass an extent_tree around. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Get inode out of ocfs2_rotate_subtree_root_right().Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the ocfs2_extent_list down through ocfs2_rotate_tree_right() and get rid of struct inode in ocfs2_rotate_subtree_root_right(). Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_complete_edge_insert() doesn't need struct inode at all.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | Completely unused argument. Get rid of it. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Pass ocfs2_extent_tree to ocfs2_unlink_path()Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ocfs2_unlink_path() doesn't need struct inode, so let's pass it struct ocfs2_extent_tree. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_create_new_meta_bhs() doesn't need struct inode.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass struct ocfs2_extent_tree into ocfs2_create_new_meta_bhs(). It no longer needs struct inode or ocfs2_super. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: ocfs2_find_path() only needs the caching infoJoel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ocfs2_find_path and ocfs2_find_leaf() walk our btrees, reading extent blocks. They need struct ocfs2_caching_info for that, but not struct inode. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Pass ocfs2_caching_info to ocfs2_read_extent_block().Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | extent blocks belong to btrees on more than just inodes, so we want to pass the ocfs2_caching_info structure directly to ocfs2_read_extent_block(). A number of places in alloc.c can now drop struct inode from their argument list. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Store the ocfs2_caching_info on ocfs2_extent_tree.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What do we cache? Metadata blocks. What are most of our non-inode metadata blocks? Extent blocks for our btrees. struct ocfs2_extent_tree is the main structure for managing those. So let's store the associated ocfs2_caching_info there. This means that ocfs2_et_root_journal_access() doesn't need struct inode anymore, and any place that has an et can refer to et->et_ci instead of INODE_CACHE(inode). Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Pass struct ocfs2_caching_info to the journal functions.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The next step in divorcing metadata I/O management from struct inode is to pass struct ocfs2_caching_info to the journal functions. Thus the journal locks a metadata cache with the cache io_lock function. It also can compare ci_last_trans and ci_created_trans directly. This is a large patch because of all the places we change ocfs2_journal_access..(handle, inode, ...) to ocfs2_journal_access..(handle, INODE_CACHE(inode), ...). Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: move ip_created_trans to struct ocfs2_caching_infoJoel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar ip_last_trans, ip_created_trans tracks the creation of a journal managed inode. This specifically tracks what transaction created the inode. This is so the code can know if the inode has ever been written to disk. This behavior is desirable for any journal managed object. We move it to struct ocfs2_caching_info as ci_created_trans so that any object using ocfs2_caching_info can rely on this behavior. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: move ip_last_trans to struct ocfs2_caching_infoJoel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have the read side of metadata caching isolated to struct ocfs2_caching_info, now we need the write side. This means the journal functions. The journal only does a couple of things with struct inode. This change moves the ip_last_trans field onto struct ocfs2_caching_info as ci_last_trans. This field tells the journal whether a pending journal flush is required. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Take the inode out of the metadata read/write paths.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are really passing the inode into the ocfs2_read/write_blocks() functions to get at the metadata cache. This commit passes the cache directly into the metadata block functions, divorcing them from the inode. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Change metadata caching locks to an operations structure.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't really want to cart around too many new fields on the ocfs2_caching_info structure. So let's wrap all our access of the parent object in a set of operations. One pointer on caching_info, and more flexibility to boot. Signed-off-by: Joel Becker <joel.becker@oracle.com>
| * | | ocfs2: Make the ocfs2_caching_info structure self-contained.Joel Becker2009-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to use the ocfs2_caching_info structure in places that are not inodes. To do that, it can no longer rely on referencing the inode directly. This patch moves the flags to ocfs2_caching_info->ci_flags, stores pointers to the parent's locks on the ocfs2_caching_info, and renames the constants and flags to reflect its independant state. Signed-off-by: Joel Becker <joel.becker@oracle.com>
* | | | fs: change sys_truncate length parameter typeHeiko Carstens2009-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For this system call user space passes a signed long length parameter, while the kernel side takes an unsigned long parameter and converts it later to signed long again. This has led to bugs in compat wrappers see e.g. dd90bbd5 "powerpc: Add compat_sys_truncate". The s390 compat wrapper for this functions is broken as well since it also performs zero extension instead of sign extension for the length parameter. In addition if hpa comes up with an automated way of generating compat wrappers it would generate a wrong one here. So change the length parameter from unsigned long to long. Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | ext2: fix format string compile warning (ino_t)Heiko Carstens2009-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike on most other architectures ino_t is an unsigned int on s390. So add an explicit cast to avoid this compile warning: fs/ext2/namei.c: In function 'ext2_lookup': fs/ext2/namei.c:73: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>