summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
Commit message (Collapse)AuthorAgeFilesLines
* Btrfs: Tune readahead during defrag to avoid reading too much at onceChris Mason2008-09-251-13/+28
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Split the extent_map code into two partsChris Mason2008-09-251-22/+21
| | | | | | | | | | | | | | There is now extent_map for mapping offsets in the file to disk and extent_io for state tracking, IO submission and extent_bufers. The new extent_map code shifts from [start,end] pairs to [start,len], and pushes the locking out into the caller. This allows a few performance optimizations and is easier to use. A number of extent_map usage bugs were fixed, mostly with failing to remove extent_map entries when changing the file. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add mount -o ssd, which includes optimizations for seek free storageChris Mason2008-09-251-1/+30
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix extent_buffer usage when nodesize != leafsizeChris Mason2008-09-251-3/+10
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: online shrinking fixesChris Mason2008-09-251-9/+23
| | | | | | | | | | While shrinking the FS, the allocation functions need to make sure they don't try to allocate bytes past the end of the FS. nodatacow needed an extra check to force cows when the existing extents are past the end of the FS. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Disable btree reada during extent backref lookups.Chris Mason2008-09-251-0/+4
| | | | | | This reada is generally not effective. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add data=ordered supportChris Mason2008-09-251-1/+3
| | | | | | | | This forces file data extents down the disk along with the metadata that references them. The current implementation is fairly simple, and just writes out all of the dirty pages in an inode before the commit. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: resizer: don't hold the fs_mutex for long periods of timeChris Mason2008-09-251-1/+21
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Properly call btrfs_search_slot while shrinkingChris Mason2008-09-251-1/+9
| | | | | | | | The shrinking code used btrfs_next_leaf to find the next item, but this does not cow the blocks it touches. This fix calls search_slot after finding the next item to do appropriate cow and balancing. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Properly handle overlapping extent in shrink_extent_treeYan2008-09-251-84/+56
| | | | | | | | | | | The patch fixes the overlapping extent issue in shrink_extent_tree. It checks whether there is an overlapping extent by using find_previous_extent. If there is an overlapping extent, it setups key.objectid and cur_byte properly. --- Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add a helper that finds previous extent itemYan2008-09-251-44/+36
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* count_snapshots: Properly update the leaf pointer after btrfs_next_leafChris Mason2008-09-251-2/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Force inlining off in a few places to save stack usageChris Mason2008-09-251-29/+37
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: 32 bit compile fixes for the resizer and enospc checksChris Mason2008-09-251-1/+3
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Reduce stack usage in the resizer, fix 32 bit compilesChris Mason2008-09-251-36/+38
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Explicitly send a root objectid to count_snapshots_in_pathChris Mason2008-09-251-10/+6
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add readahead to the online shrinker, and a mount -o alloc_start= for ↵Chris Mason2008-09-251-4/+5
| | | | | | testing Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix NULL block groups on reading the inodeChris Mason2008-09-251-2/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Support for online FS resize (grow and shrink)Chris Mason2008-09-251-0/+480
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add mount option to turn off data cowChris Mason2008-09-251-3/+98
| | | | | | | | | | | A number of workloads do not require copy on write data or checksumming. mount -o nodatasum to disable checksums and -o nodatacow to disable both copy on write and checksumming. In nodatacow mode, copy on write is still performed when a given extent is under snapshot. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Reorder extent back refs to differentiate btree blocks from file dataChris Mason2008-09-251-8/+8
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Fix btrfs_inc_ref to add backref hintsChris Mason2008-09-251-2/+4
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Extra NULL block group checks in find_free_extentChris Mason2008-09-251-0/+6
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add lowest key information to back refs for extent tree blocks as well.Chris Mason2008-09-251-1/+101
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add back pointers from extents to the btree or file referencing themChris Mason2008-09-251-62/+311
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Implement generation numbers in block pointersChris Mason2008-09-251-2/+58
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix extent allocation for btree blocks as the disk fillsChris Mason2008-09-251-11/+17
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add simple stripe size parameterChris Mason2008-09-251-8/+28
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfs_drop_extents: make sure the item is getting smaller before truncateChris Mason2008-09-251-0/+8
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Handle writeback under high memory pressure betterChris Mason2008-09-251-1/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add check for null block group to find_search_startChris Mason2008-09-251-0/+3
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Off by one fixes for extent-tree.cYan2008-09-251-7/+3
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add full_scan parameter to find_search_startYan2008-09-251-8/+6
| | | | | | | | | | | | 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-251-14/+40
| | | | | | | | | 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-251-6/+30
| | | | | | 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-251-6/+36
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Properly update free space cache in __free_extentYan2008-09-251-2/+4
| | | | | | | 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-251-6/+8
| | | | | | | 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-251-4/+4
| | | | | | 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-251-0/+4
| | | | 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/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add an extent buffer LRU to reduce radix tree hitsChris Mason2008-09-251-1/+0
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix allocation routines to avoid intermixing data and metadata ↵Chris Mason2008-09-251-16/+22
| | | | | | allocations Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add back the online defragging codeChris Mason2008-09-251-7/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Allow tree blocks larger than the page sizeChris Mason2008-09-251-138/+147
| | | | 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-251-121/+72
| | | | | | trees Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Stop using radix trees for the block group cacheChris Mason2008-09-251-214/+148
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix extent_buffer and extent_state leaksChris Mason2008-09-251-68/+58
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Create extent_buffer interface for large blocksizesChris Mason2008-09-251-144/+150
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix duplicate ENOSPC checks in find_free_extentChris Mason2008-09-251-14/+4
| | | | | | | | 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>
OpenPOWER on IntegriCloud