summaryrefslogtreecommitdiff
path: root/fs
AgeCommit message (Collapse)AuthorFilesLines
2008-09-25Fix for btrfs_find_free_objectidYan1-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>
2008-09-25Btrfs: Add mount -o ssd, which includes optimizations for seek free storageChris Mason6-2/+47
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Use blk_congestion_wait on older kernelsChris Mason1-1/+6
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix compile on 2.6.22 kernelYan2-2/+8
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 enabledYan2-3/+8
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix data=ordered vs wait_on_inode deadlock on older kernelsChris Mason3-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>
2008-09-25Btrfs: Run igrab on data=ordered inodes to prevent deadlocks during writeoutChris Mason5-10/+37
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Disable delalloc accounting for nowChris Mason1-0/+2
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Rework btrfs_drop_inode to avoid schedulingChris Mason6-10/+44
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add drop inode func to avoid data=ordered deadlockChris Mason3-0/+21
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Delete any remaining extent_maps before freeing the inodeChris Mason1-0/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Only delete roots from sysfs when they were added to sysfsChris Mason1-1/+2
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Change magic string to reflect new formatChris Mason2-2/+3
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add readonly inode flagYan2-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>
2008-09-25Btrfs: Implement ACLs setting and gettingYan3-41/+51
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 Mason1-2/+0
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix extent_buffer usage when nodesize != leafsizeChris Mason3-15/+54
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add flush barriers on commitChris Mason3-3/+16
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Remove extent_map debugging messageChris Mason1-1/+0
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add inode flags supportYan3-14/+24
This patch adds NODATASUM & NODATACOW inode flags support. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: online shrinking fixesChris Mason2-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>
2008-09-25Btrfs: Disable btree reada during extent backref lookups.Chris Mason1-0/+4
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 Mason6-0/+26
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Move snapshot creation to commit timeChris Mason3-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>
2008-09-25Btrfs: Add data=ordered supportChris Mason13-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>
2008-09-25Btrfs: Change tree block csum tagging to avoid false error messagesChris Mason1-10/+36
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: resizer: don't hold the fs_mutex for long periods of timeChris Mason1-1/+21
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Properly call btrfs_search_slot while shrinkingChris Mason1-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>
2008-09-25Btrfs: Lower the max inline size to 8kChris Mason1-1/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Change st_blocksize to 4kChris Mason2-2/+9
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_treeYan1-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>
2008-09-25Btrfs: Add a helper that finds previous extent itemYan1-44/+36
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix lock ordering of the snapshot semaphore against the page lockChris Mason1-2/+4
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25count_snapshots: Properly update the leaf pointer after btrfs_next_leafChris Mason2-3/+3
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Force inlining off in a few places to save stack usageChris Mason3-49/+54
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: 32 bit compile fixes for the resizer and enospc checksChris Mason2-4/+10
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Reduce stack usage in the resizer, fix 32 bit compilesChris Mason5-43/+63
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Explicitly send a root objectid to count_snapshots_in_pathChris Mason2-44/+11
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 Mason5-9/+28
testing Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix NULL block groups on reading the inodeChris Mason2-2/+6
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Support for online FS resize (grow and shrink)Chris Mason8-14/+629
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix an off by one in the extent_map prepare write codeChris Mason2-3/+3
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Implement basic support for -ENOSPCChris Mason6-28/+193
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 Mason1-9/+11
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix nodatacow extent lookupChris Mason1-1/+0
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>
2008-09-25Btrfs: Fix delayed allocation to avoid missing delalloc extentsChris Mason2-2/+8
find_lock_delalloc_range could exit out too early Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25kmalloc a few large stack objects in the btrfs_ioctl pathChris Mason2-24/+56
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Back port to 2.6.18-el kernelsChris Mason9-20/+239
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add mount option to enforce a max extent sizeChris Mason4-11/+65
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix extent_map and extent_state leaks by flushing lrus on FS unmountChris Mason1-0/+10
Signed-off-by: Chris Mason <chris.mason@oracle.com>