summaryrefslogtreecommitdiffstats
path: root/fs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fixes for loopback files in btrfsChris Mason2008-09-252-2/+14
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Off by one fix for btrfs_drop_extentsYan2008-09-251-1/+2
| | | | | | | | | | | One of my old patches introduces a new bug to btrfs_drop_extents(changeset 275). Inline extents are not truncated properly when "extent_end == end", it can trigger the BUG_ON at file.c:600. I hope I don't introduce new bug this time. --- Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Reorder extent back refs to differentiate btree blocks from file dataChris Mason2008-09-252-10/+10
| | | | 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: Fix typo in .. check (thanks Yan)Chris Mason2008-09-251-1/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add backrefs for symbolic link inodesChris Mason2008-09-251-17/+13
| | | | 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 back pointers from the inode to the directory that references itChris Mason2008-09-253-143/+272
| | | | 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-254-19/+110
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add back pointers from extents to the btree or file referencing themChris Mason2008-09-258-105/+577
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Implement generation numbers in block pointersChris Mason2008-09-253-8/+115
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: section mismatch warningsChristian Hesse2008-09-253-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | --Boundary-00=_CcOWHFYK4T+JwSj Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello everybody, compiling btrfs into the kernel results in section mismatch warnings. __exit functions are called where they are not allowed to. The attached patch fixes this for me. Not sure if it is correct though. Signed-off-by: Christian Hesse <mail@earthworm.de> -- Regards, Chris --Boundary-00=_CcOWHFYK4T+JwSj Content-Type: text/x-diff; charset="iso-8859-1"; name="btrfs-section_mismatches.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="btrfs-section_mismatches.patch" Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix buffer get/release issue in create_snapshotYan2008-09-251-2/+2
| | | | | | btrfs_cow_block expects a reference to be held on the buffer being cow'd. 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-253-13/+43
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfs_drop_extents: make sure the item is getting smaller before truncateChris Mason2008-09-253-16/+24
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add efficient dirty accounting to the extent_map treeChris Mason2008-09-253-4/+36
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fine tune the btree writeback exclusion some moreChris Mason2008-09-252-1/+6
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Only limit btree writeback for pdflushChris Mason2008-09-251-1/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Limit btree writeback to prevent seeksChris Mason2008-09-253-0/+51
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Handle writeback under high memory pressure betterChris Mason2008-09-252-1/+13
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Properly update right_nritems in push_leaf_leftYan2008-09-251-3/+2
| | | | | | | | The codes that fixup the right leaf and the codes that dirty the extnet buffer use the variable 'right_nritems' , both of them expect 'right_nritems' is the number of items in right leaf after the push. 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: Make sure page mapping dirty tag is properly clearedChris Mason2008-09-251-2/+20
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Avoid fragmentation from parallel delalloc fillingChris Mason2008-09-251-34/+49
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Return value checking in module initWyatt Banks2008-09-253-6/+33
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: xattr fixesJosef Bacik2008-09-251-2/+2
| | | | | | This fixes two typos that Yan pointed out to me. Thanks much, Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Make ACLs return EOPNOTSUPP for nowJosef Bacik2008-09-252-2/+20
| | | | | | | | | | | | | | There was a slight problem with ACL's returning EINVAL when you tried to set an ACL. This isn't correct, we should be returning EOPNOTSUPP, so I did a very ugly thing and just commented everybody out and made them return EOPNOTSUPP. This is only temporary, I'm going back to implement ACL's, but Chris wants to push out a release so this will suffice for now. Also Yan suggested setting reada to -1 in the delete case to enable backwards readahead, and in the listxattr case I moved path->reada = 2; to after the if (!path) check so we can avoid a possible null dereference. Thank you, 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-253-16/+44
| | | | | | | | | 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>
* xattr support for btrfsJosef Bacik2008-09-259-14/+751
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix extent bit range testingChris Mason2008-09-251-7/+17
| | | | | | | It could return the bit as set when there was actually a hole at the very end of the range. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add readpages supportChris Mason2008-09-253-8/+78
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Avoid extent_buffer lru corruptionChris Mason2008-09-251-1/+7
| | | | 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-252-6/+36
| | | | | | groups Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix failure cleanups when allocating extent buffers failChris Mason2008-09-251-26/+30
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Use writepages for the metadata tooChris Mason2008-09-251-3/+26
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Properly delete csum item in btrfs_truncate_in_trans.Yan2008-09-251-1/+2
| | | | | | | | | | When 'item_end' is equal to 'inode->i_size', 'found_type' is updated and current item is skipped. This behavior is correct for extent item, but incorrect for csum item. For example, there is a csum item with 'offset == 0'. When deleting the inode, 'inode->i_size' is set to 0, so the csum item isn't deleted. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Change push_leaf_{leaf,right} to empty the src leave during item deletionChris Mason2008-09-251-24/+50
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Fix recursive KM_USER1 usage in btrfs_realloc_nodeChris Mason2008-09-252-8/+19
| | | | 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-253-7/+43
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Fix EXTENT_MAP_INLINE off by one in btrfs_drop_extentsYan2008-09-251-2/+1
| | | | | | | | Don't set hint_byte to EXTENT_MAP_INLINE when 'end == extent_end' or 'start == key.offset' . The inline extent will be truncated in these cases. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix u32 overflow in dirty_and_release_pages.Yan2008-09-251-4/+5
| | | | | | | | | | | When calculating the size of inline extent, inode->i_size should also be take into consideration, otherwise sys_write may drop some data silently. You can test this bug by: #dd if=/dev/zero bs=4k count=1 of=test_file #dd if=/dev/zero bs=2k count=1 of=test_file conv=notrunc Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Make defrag check nodes against the progress key to prevent repeating ↵Chris Mason2008-09-252-25/+34
| | | | | | work 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: Add writepages supportChris Mason2008-09-253-25/+124
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: small fixes for find_lock_delalloc_range.Yan2008-09-251-1/+3
| | | | | | | | There is a 'finish_wait', but no 'prepare_to_wait' . So I think that the 'prepare_to_wait' is missing. The second change is according to the name of variable. 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: Fix a number of inline extent problems that Yan Zheng reported.Chris Mason2008-09-258-38/+135
| | | | | | | | | | | | | | | | | | The fixes do a number of things: 1) Most btrfs_drop_extent callers will try to leave the inline extents in place. It can truncate bytes off the beginning of the inline extent if required. 2) writepage can now update the inline extent, allowing mmap writes to go directly into the inline extent. 3) btrfs_truncate_in_transaction truncates inline extents 4) extent_map.c fixed to not merge inline extent mappings and hole mappings together Signed-off-by: Chris Mason <chris.mason@oracle.com>