summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Btrfs: Add back pointers from extents to the btree or file referencing themChris Mason2008-09-251-20/+176
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Implement generation numbers in block pointersChris Mason2008-09-251-0/+16
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Properly update right_nritems in push_leaf_leftYan2008-09-251-3/+2
| | | | | | | | The codes that fixup the right leaf and the codes that dirty the extnet buffer use the variable 'right_nritems' , both of them expect 'right_nritems' is the number of items in right leaf after the push. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Change push_leaf_{leaf,right} to empty the src leave during item deletionChris Mason2008-09-251-24/+50
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Make defrag check nodes against the progress key to prevent repeating ↵Chris Mason2008-09-251-24/+32
| | | | | | work Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix a number of inline extent problems that Yan Zheng reported.Chris Mason2008-09-251-6/+46
| | | | | | | | | | | | | | | | | | The fixes do a number of things: 1) Most btrfs_drop_extent callers will try to leave the inline extents in place. It can truncate bytes off the beginning of the inline extent if required. 2) writepage can now update the inline extent, allowing mmap writes to go directly into the inline extent. 3) btrfs_truncate_in_transaction truncates inline extents 4) extent_map.c fixed to not merge inline extent mappings and hole mappings together Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Tune the automatic defrag codeChris Mason2008-09-251-43/+26
| | | | | | | | | | | 1) Forced defrag wasn't working properly (btrfsctl -d) because some cache only checks were incorrect. 2) Defrag only the leaves unless in forced defrag mode. 3) Don't use complex logic to figure out if a leaf is needs defrag Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix split_leaf to detect when it is extending an itemChris Mason2008-09-251-51/+27
| | | | | | | | | When making room for a new item, it is ok to create an empty leaf, but when making room to extend an item, split_leaf needs to make sure it keeps the item we're extending in the path and make sure we don't end up with an empty leaf. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix split_leaf to avoid incorrect double splitsChris Mason2008-09-251-1/+5
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: CPU usage optimizations in push and the extent_map codeChris Mason2008-09-251-20/+24
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfs: 32-bit type problemsJens Axboe2008-09-251-1/+1
| | | | | | An assorted set of casts to get rid of the warnings on 32-bit archs. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Default to 8k max packed tailsChris Mason2008-09-251-1/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Defrag only leaves, and only when the parent node has a single objectidChris Mason2008-09-251-6/+16
| | | | | | | This allows us to defrag huge directories, but skip the expensive defrag case in more common usage, where it does not help as much. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Defrag: only walk into nodes with the defrag bit setChris Mason2008-09-251-1/+0
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Large block related defrag optimizationsChris Mason2008-09-251-3/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Breakout BTRFS_SETGET_FUNCS into a separate C file, the inlines were too big.Chris Mason2008-09-251-1/+0
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: extent_map optimizations to cut down on CPU usageChris Mason2008-09-251-0/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Allow tails larger than one pageChris Mason2008-09-251-5/+19
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add an extent buffer LRU to reduce radix tree hitsChris Mason2008-09-251-3/+0
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add back the online defragging codeChris Mason2008-09-251-89/+88
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Allow tree blocks larger than the page sizeChris Mason2008-09-251-90/+229
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix extent_buffer and extent_state leaksChris Mason2008-09-251-2/+8
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Optimizations for the extent_buffer codeChris Mason2008-09-251-27/+24
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Create extent_buffer interface for large blocksizesChris Mason2008-09-251-667/+817
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Add support for defragging files via btrfsctl -d. Avoid OOM on extent treeChris Mason2007-09-111-0/+4
| | | | | | defrag. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: ctree.c cleanupsYan2007-08-291-6/+8
| | | | | | | Fixup a few buffer_head release errors, and fix an off by one in balance_node_right. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Do more extensive readahead during tree searchesChris Mason2007-08-271-13/+49
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* fix block readahead in btrfs_next_leafYan2007-08-271-1/+1
| | | | | | Send the correct slot down to reada_for_search Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add BH_Defrag to mark buffers that are in need of defraggingChris Mason2007-08-101-10/+12
| | | | | | | | This allows the tree walking code to defrag only the newly allocated buffers, it seems to be a good balance between perfect defragging and the performance hit of repeatedly reallocating blocks. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Btree defrag on the extent-mapping tree as wellChris Mason2007-08-101-7/+11
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add run time btree defrag, and an ioctl to force btree defragChris Mason2007-08-071-42/+153
| | | | | | | | | | | This adds two types of btree defrag, a run time form that tries to defrag recently allocated blocks in the btree when they are still in ram, and an ioctl that forces defrag of all btree blocks. File data blocks are not defragged yet, but this can make a huge difference in sequential btree reads. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fold some btree readahead routines into something more generic.Chris Mason2007-08-071-0/+77
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Do snapshot deletion in smaller chunks.Chris Mason2007-08-071-0/+10
| | | | | | | | | Before, snapshot deletion was a single atomic unit. This caused considerable lock contention and required an unbounded amount of space. Now, the drop_progress field in the root item is used to indicate how far along snapshot deletion is, and to resume where it left off. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Some code cleanupsAneesh2007-07-111-2/+6
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: trivial include fixupsZach Brown2007-07-111-1/+0
| | | | | | | | | | | Almost none of the files including module.h need to do so, remove them. Include sched.h in extent-tree.c to silence a warning about cond_resched() being undeclared. Signed-off-by: Zach Brown <zach.brown@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: crash recovery fixesChris Mason2007-06-281-1/+12
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Audit callers and return codes to make sure -ENOSPC gets up the stackChris Mason2007-06-221-24/+82
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfs: Code cleanupAneesh2007-06-131-1/+0
| | | | | | | | | | | Attaching below is some of the code cleanups that i came across while reading the code. a) alloc_path already calls init_path. b) Mention that btrfs_inode is the in memory copy.Ext4 have ext4_inode_info as the in memory copy ext4_inode as the disk copy Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: add GPLv2Chris Mason2007-06-121-0/+18
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: patch queue: fix corruption when splitting large itemsChris Mason2007-05-111-2/+8
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: fix check_node and check_leaf to use less cpuChris Mason2007-05-101-18/+26
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: allocator improvements, inode block groupsChris Mason2007-04-301-5/+5
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: add owner and type fields to the extents aand block headersChris Mason2007-04-211-0/+5
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: node balance optimizationsChris Mason2007-04-201-11/+19
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: write barriers on commit, balance level before splitChris Mason2007-04-201-0/+119
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: working file_write, reorganized key flagsChris Mason2007-04-181-3/+27
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: rework csums and extent item orderingChris Mason2007-04-171-5/+4
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: progress on file_writeChris Mason2007-04-171-0/+57
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: early work to file_write in big extentsChris Mason2007-04-161-0/+54
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: create a logical->phsyical block number mapping schemeChris Mason2007-04-111-19/+19
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>