aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-09-25Btrfs: Split the extent_map code into two partsChris Mason
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>
2008-09-25Btrfs: Fix hole insertion corner casesChris Mason
There were a few places that could cause duplicate extent insertion, this adjusts the code that creates holes to avoid it. lookup_extent_map is changed to correctly return all of the extents in a range, even when there are none matching at the start of the range. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Include sched.h in the acl code for current (fixes compile on 2.6.23)Chris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add basic lockfs callsYan
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix for test_range_bitYan
test_range_bit doesn't properly handle the case: there's a hole at the end of the range and there's no other extent_state after the range. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Fix for btrfs_find_free_objectidYan
btrfs_find_free_objectid may return a used objectid due to arithmetic underflow. This bug may happen when parameter 'root' is tree root, so it may cause serious problems when creating snapshot or sub-volume. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add mount -o ssd, which includes optimizations for seek free storageChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Use blk_congestion_wait on older kernelsChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix compile on 2.6.22 kernelYan
This patch fixes compile error on kernel-2.6.22 Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix compile on kernel without ACLs enabledYan
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix data=ordered vs wait_on_inode deadlock on older kernelsChris Mason
Using ilookup5 during data=ordered writeback could deadlock on I_LOCK. This saves a pointer to the inode instead. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Run igrab on data=ordered inodes to prevent deadlocks during writeoutChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Disable delalloc accounting for nowChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Rework btrfs_drop_inode to avoid schedulingChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add drop inode func to avoid data=ordered deadlockChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Delete any remaining extent_maps before freeing the inodeChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Only delete roots from sysfs when they were added to sysfsChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Change magic string to reflect new formatChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add readonly inode flagYan
This patch adds readonly inode flag support. A file with this flag can't be modified, but can be deleted. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Implement ACLs setting and gettingYan
ACLs are stored but not used for permission checks (yet) Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Remove verbose WARN_ONChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix extent_buffer usage when nodesize != leafsizeChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add flush barriers on commitChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Remove extent_map debugging messageChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add inode flags supportYan
This patch adds NODATASUM & NODATACOW inode flags support. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: online shrinking fixesChris Mason
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>
2008-09-25Btrfs: Disable btree reada during extent backref lookups.Chris Mason
This reada is generally not effective. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add some simple throttling to wait for data=ordered and snapshot deletionChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Move snapshot creation to commit timeChris Mason
It is very difficult to create a consistent snapshot of the btree when other writers may update the btree before the commit is done. This changes the snapshot creation to happen during the commit, while no other updates are possible. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add data=ordered supportChris Mason
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>
2008-09-25Btrfs: Change tree block csum tagging to avoid false error messagesChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: resizer: don't hold the fs_mutex for long periods of timeChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Properly call btrfs_search_slot while shrinkingChris Mason
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>
2008-09-25Btrfs: Lower the max inline size to 8kChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Change st_blocksize to 4kChris Mason
Some programs (python) do rwm cycles at the granularity returned by stat. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Properly handle overlapping extent in shrink_extent_treeYan
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>
2008-09-25Btrfs: Add a helper that finds previous extent itemYan
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix lock ordering of the snapshot semaphore against the page lockChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25count_snapshots: Properly update the leaf pointer after btrfs_next_leafChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Force inlining off in a few places to save stack usageChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: 32 bit compile fixes for the resizer and enospc checksChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Reduce stack usage in the resizer, fix 32 bit compilesChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Explicitly send a root objectid to count_snapshots_in_pathChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add readahead to the online shrinker, and a mount -o alloc_start= for ↵Chris Mason
testing Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix NULL block groups on reading the inodeChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Support for online FS resize (grow and shrink)Chris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix an off by one in the extent_map prepare write codeChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Implement basic support for -ENOSPCChris Mason
This is intended to prevent accidentally filling the drive. A determined user can still make things oops. It includes some accounting of the current bytes under delayed allocation, but this will change as things get optimized Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Less aggressive readahead on deletesChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix nodatacow extent lookupChris Mason
Yan Zheng noticed the offset into the extent was incorrectly being added to the extent start before trying to find it in the extent allocation tree. Signed-off-by: Chris Mason <chris.mason@oracle.com>