summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Btrfs: Add some extra debugging around file data checksum failuresChris Mason2008-09-252-3/+9
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Force f_pos to the max when a readdir hits the end of the directory.Chris Mason2008-09-251-1/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* 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-2514-3413/+3612
| | | | | | | | | | | | | | 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: Fix hole insertion corner casesChris Mason2008-09-254-13/+126
| | | | | | | | | | 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>
* Btrfs: Include sched.h in the acl code for current (fixes compile on 2.6.23)Chris Mason2008-09-251-0/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add basic lockfs callsYan2008-09-251-1/+13
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix for test_range_bitYan2008-09-251-0/+5
| | | | | | | 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>
* Fix for btrfs_find_free_objectidYan2008-09-251-3/+1
| | | | | | | | 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>
* Btrfs: Add mount -o ssd, which includes optimizations for seek free storageChris Mason2008-09-256-2/+47
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Use blk_congestion_wait on older kernelsChris Mason2008-09-251-1/+6
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix compile on 2.6.22 kernelYan2008-09-252-2/+8
| | | | | | This patch fixes compile error on kernel-2.6.22 Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix compile on kernel without ACLs enabledYan2008-09-252-3/+8
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix data=ordered vs wait_on_inode deadlock on older kernelsChris Mason2008-09-253-21/+27
| | | | | | | 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>
* Btrfs: Run igrab on data=ordered inodes to prevent deadlocks during writeoutChris Mason2008-09-255-10/+37
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Disable delalloc accounting for nowChris Mason2008-09-251-0/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Rework btrfs_drop_inode to avoid schedulingChris Mason2008-09-256-10/+44
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add drop inode func to avoid data=ordered deadlockChris Mason2008-09-253-0/+21
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Delete any remaining extent_maps before freeing the inodeChris Mason2008-09-251-0/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Only delete roots from sysfs when they were added to sysfsChris Mason2008-09-251-1/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Change magic string to reflect new formatChris Mason2008-09-252-2/+3
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add readonly inode flagYan2008-09-252-7/+15
| | | | | | | 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>
* Btrfs: Implement ACLs setting and gettingYan2008-09-253-41/+51
| | | | | | ACLs are stored but not used for permission checks (yet) Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Remove verbose WARN_ONChris Mason2008-09-251-2/+0
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix extent_buffer usage when nodesize != leafsizeChris Mason2008-09-253-15/+54
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add flush barriers on commitChris Mason2008-09-253-3/+16
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Remove extent_map debugging messageChris Mason2008-09-251-1/+0
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add inode flags supportYan2008-09-253-14/+24
| | | | | | This patch adds NODATASUM & NODATACOW inode flags support. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: online shrinking fixesChris Mason2008-09-252-11/+36
| | | | | | | | | | 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 some simple throttling to wait for data=ordered and snapshot deletionChris Mason2008-09-256-0/+26
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Move snapshot creation to commit timeChris Mason2008-09-253-67/+100
| | | | | | | | | | 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>
* Btrfs: Add data=ordered supportChris Mason2008-09-2513-28/+387
| | | | | | | | 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: Change tree block csum tagging to avoid false error messagesChris Mason2008-09-251-10/+36
| | | | 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: Lower the max inline size to 8kChris Mason2008-09-251-1/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Change st_blocksize to 4kChris Mason2008-09-252-2/+9
| | | | | | | Some programs (python) do rwm cycles at the granularity returned by stat. 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>
* Btrfs: Fix lock ordering of the snapshot semaphore against the page lockChris Mason2008-09-251-2/+4
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* count_snapshots: Properly update the leaf pointer after btrfs_next_leafChris Mason2008-09-252-3/+3
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Force inlining off in a few places to save stack usageChris Mason2008-09-253-49/+54
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: 32 bit compile fixes for the resizer and enospc checksChris Mason2008-09-252-4/+10
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Reduce stack usage in the resizer, fix 32 bit compilesChris Mason2008-09-255-43/+63
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Explicitly send a root objectid to count_snapshots_in_pathChris Mason2008-09-252-44/+11
| | | | 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-255-9/+28
| | | | | | testing Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix NULL block groups on reading the inodeChris Mason2008-09-252-2/+6
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Support for online FS resize (grow and shrink)Chris Mason2008-09-258-14/+629
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix an off by one in the extent_map prepare write codeChris Mason2008-09-252-3/+3
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
OpenPOWER on IntegriCloud