aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
Commit message (Collapse)AuthorAge
...
* Btrfs: Add back pointers from extents to the btree or file referencing themChris Mason2008-09-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Implement generation numbers in block pointersChris Mason2008-09-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix extent allocation for btree blocks as the disk fillsChris Mason2008-09-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add simple stripe size parameterChris Mason2008-09-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfs_drop_extents: make sure the item is getting smaller before truncateChris Mason2008-09-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Handle writeback under high memory pressure betterChris Mason2008-09-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add check for null block group to find_search_startChris Mason2008-09-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Off by one fixes for extent-tree.cYan2008-09-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add full_scan parameter to find_search_startYan2008-09-25
| | | | | | | | | | | | This patch adds a new parameter 'full_scan' to 'find_search_start', thereby 'find_search_start' can know whether 'find_free_extent' is in full scan phrase. I feel that 'find_search_start' should skip calling 'btrfs_find_block_group' when 'find_free_extent' is in full scan phrase. In my test on a 2GB volume, Oops occurs when space usage is about 76%. After apply the patch, Oops occurs when space usage is near 100%. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add block group pinned accounting backYan2008-09-25
| | | | | | | | | This patch adds a helper function 'update_pinned_extents' to extent-tree.c. The usage of the helper function is similar to 'update_block_group', the last parameter of the function indicates pin vs unpin. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Allow large data extents in a single file to span into metadata block ↵Chris Mason2008-09-25
| | | | | | groups Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Optimize allocations as we need to mix data and metadata into one groupChris Mason2008-09-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Properly update free space cache in __free_extentYan2008-09-25
| | | | | | | When pin_down_bytes decides not to pin a block because it was from the current transaction, make sure the in memory cache of free extents is updated Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix typo and memory leak in extent-tree.cYan2008-09-25
| | | | | | | This patch fixes a typo in update_block_group and memory leak in btrfs_free_block_groups. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfs: 32-bit type problemsJens Axboe2008-09-25
| | | | | | 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: Add back metadata checksummingChris Mason2008-09-25
| | | | 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-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add an extent buffer LRU to reduce radix tree hitsChris Mason2008-09-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix allocation routines to avoid intermixing data and metadata ↵Chris Mason2008-09-25
| | | | | | allocations Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add back the online defragging codeChris Mason2008-09-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Allow tree blocks larger than the page sizeChris Mason2008-09-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Change the remaining radix trees used by extent-tree.c to extent_map ↵Chris Mason2008-09-25
| | | | | | trees Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Stop using radix trees for the block group cacheChris Mason2008-09-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix extent_buffer and extent_state leaksChris Mason2008-09-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Create extent_buffer interface for large blocksizesChris Mason2008-09-25
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix duplicate ENOSPC checks in find_free_extentChris Mason2008-09-25
| | | | | | | | find_free_extent would fail to wrap around to the start of the drive because it was doing the enospc case checking twice in some cases, causing it to return -ENOSPC early. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Use balance_dirty_pages_nr on btree blocksChris Mason2008-09-25
| | | | | | | | btrfs_btree_balance_dirty is changed to pass the number of pages dirtied for more accurate dirty throttling. This lets the VM make better decisions about when to force some writeback. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix cache_block_group to catch holes at the start of the groupYan2007-09-14
| | | | | | | Cache block group was overly complex and missed free blocks at the very start of the group. This patch simplifies things significantly. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix oopsen in extent_tree.c during enospcYan2007-08-29
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add per-root block accounting and sysfs entriesJosef Bacik2007-08-29
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add delayed allocation to the extent based page tree codeChris Mason2007-08-27
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Do more extensive readahead during tree searchesChris Mason2007-08-27
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add BH_Defrag to mark buffers that are in need of defraggingChris Mason2007-08-10
| | | | | | | | 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-10
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Further reduce the concurrency penalty of defrag and drop_snapshotChris Mason2007-08-08
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Replace extent tree preallocation code with some bit radix magic.Chris Mason2007-08-08
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Let some locks go during defrag and snapshot droppingChris Mason2007-08-08
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add run time btree defrag, and an ioctl to force btree defragChris Mason2007-08-07
| | | | | | | | | | | 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-07
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Do snapshot deletion in smaller chunks.Chris Mason2007-08-07
| | | | | | | | | 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: trivial include fixupsZach Brown2007-07-11
| | | | | | | | | | | 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-28
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Allow find_free_extent callers to pass in an exclusion rangeChris Mason2007-06-26
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix super block updates during transaction commitChris Mason2007-06-26
| | | | | | | | The super block written during commit was not consistent with the state of the trees. This change adds an in-memory copy of the super so that we can make sure to write out consistent data during a commit. 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-22
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: reada while dropping snapshotsChris Mason2007-06-19
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: cache the extent tree preallocationChris Mason2007-06-19
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Subject: Rework btrfs_file_write to only allocate while page locks are heldChris Mason2007-06-18
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfs: Code cleanupAneesh2007-06-13
| | | | | | | | | | | 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-12
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>