summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* Btrfs: Properly setup root key while reading the rootYan Zheng2008-09-251-0/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix typo: owner is a 64 bit fieldChris Mason2008-09-251-2/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Default to 8k max packed tailsChris Mason2008-09-252-2/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Defrag only leaves, and only when the parent node has a single objectidChris Mason2008-09-254-40/+23Star
| | | | | | | This allows us to defrag huge directories, but skip the expensive defrag case in more common usage, where it does not help as much. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add back file data checksummingChris Mason2008-09-256-19/+26
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Defrag: only walk into nodes with the defrag bit setChris Mason2008-09-252-5/+4Star
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: balance_dirty_pages_ratelimited is causing problems, use nr == 1 alwaysChris Mason2008-09-251-1/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Large block related defrag optimizationsChris Mason2008-09-252-4/+23
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add back metadata checksummingChris Mason2008-09-256-81/+245
| | | | 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-256-74/+104
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: extent_map optimizations to cut down on CPU usageChris Mason2008-09-256-91/+40Star
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Allow tails larger than one pageChris Mason2008-09-255-56/+156
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add an extent buffer LRU to reduce radix tree hitsChris Mason2008-09-256-105/+128
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix allocation routines to avoid intermixing data and metadata ↵Chris Mason2008-09-252-19/+25
| | | | | | allocations Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add back the online defragging codeChris Mason2008-09-257-106/+166
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Use an array of pages in the extent buffers to reduce the cost of ↵Chris Mason2008-09-253-19/+13Star
| | | | | | find_get_page Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Cache extent buffer mappingsChris Mason2008-09-252-6/+49
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Allow tree blocks larger than the page sizeChris Mason2008-09-2515-497/+738
| | | | 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-256-138/+94Star
| | | | | | trees Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Stop using radix trees for the block group cacheChris Mason2008-09-255-223/+171Star
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix extent_buffer and extent_state leaksChris Mason2008-09-257-87/+139
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Go back to kmaps instead of page_address in extent_buffersChris Mason2008-09-251-31/+19Star
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Avoid memcpy where possible in extent_buffersChris Mason2008-09-254-41/+147
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Optimizations for the extent_buffer codeChris Mason2008-09-254-36/+76
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Create extent_buffer interface for large blocksizesChris Mason2008-09-2522-2088/+2794
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfs_get_extent should treat inline extents as though they hold a whole blockChris Mason2008-09-251-5/+7
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: factor page private preparations into a helperChristoph Hellwig2008-09-254-37/+18Star
| | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix double free and off by one in inode.cYan2008-09-251-2/+1Star
| | | | | | | The first change removes potential double free, the second fix a off by one error. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: truncate: don't update inode->i_blocks when extent is a holeYan2008-09-251-4/+6
| | | | | | | | I think check whether extent is a hole before update 'inode->i_blocks' is unconditional required. (original codes check it only when del_item isn't equal to 0) Signed-off-by: Chris Mason <chris.mason@oracle.com>
* create btrfs_path slab with the correct sizeYan2008-09-251-1/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* fix found_type decrement in btrfs_truncate_in_transYan2008-09-251-1/+1
| | | | | | | found_type has already been decreased by codes above the change, I think decrease it by one again doesn't make sense. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix duplicate ENOSPC checks in find_free_extentChris Mason2008-09-251-14/+4Star
| | | | | | | | 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>
* Btrfs: Use balance_dirty_pages_nr on btree blocksChris Mason2008-09-256-20/+51
| | | | | | | | btrfs_btree_balance_dirty is changed to pass the number of pages dirtied for more accurate dirty throttling. This lets the VM make better decisions about when to force some writeback. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix cache_block_group to catch holes at the start of the groupYan2007-09-141-28/+33
| | | | | | | Cache block group was overly complex and missed free blocks at the very start of the group. This patch simplifies things significantly. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix off by one error in dirty_and_release_pagesYan2007-09-141-1/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* split up btrfs_ioctlChristoph Hellwig2007-09-141-47/+59
| | | | | | | Add a helper per ioctl function to make the code more readable. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: use unlocked_ioctlChristoph Hellwig2007-09-143-24/+8Star
| | | | | | | No reason to grab the BKL before calling into the btrfs ioctl code. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Simplify makefileJan Engelhardt2007-09-141-3/+4
| | | | | | Single-colons will do here. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: add modules_install targetChris Mason2007-09-141-0/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix extra link count dec in renameChris Mason2007-09-141-7/+0Star
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Find and remove dead roots the first time a root is loaded.Chris Mason2007-09-115-12/+25
| | | | | | | | | | | | | | Dead roots are trees left over after a crash, and they were either in the process of being removed or were waiting to be removed when the box crashed. Before, a search of the entire tree of root pointers was done on mount looking for dead roots. Now, the search is done the first time we load a root. This makes mount faster when there are a large number of snapshots, and it enables the block accounting code to properly update the block counts on the latest root as old versions of the root are reaped after a crash. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: [PATCH] extent_map: add writepage_end_io hookChristoph Hellwig2007-09-112-0/+3
| | | | | | | | | | | | | XFS updates the ondisk inode size only after the data I/O has finished, so it needs a hook when the writepage end_bio handler has finished. Might not be worth applying as-is as the per-page callback is very ineffcient. What XFS really wants is a callback when writeout of a whole extent has completed. This delayed i_size updates scheme might be worthwile for btrfs aswell, btw. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: [PATCH] extent_map: make the writepage_io hook optionalChristoph Hellwig2007-09-111-1/+6
| | | | | | | | | The writepage_io is not mandatory, e.g. my port of xfs to the extent_map code does not have one for now. So handle a NULL pointer gracefully here. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: [PATCH] extent_map: provide generic bmapChristoph Hellwig2007-09-113-21/+23
| | | | | | | | | | generic_bmap is completely trivial, while the extent to bh mapping in btrfs is rather complex. So provide a extent_bmap instead that takes a get_extent callback and can be used by filesystem using the extent_map code. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: [PATCH] extent_map: fix locking for bio completionChristoph Hellwig2007-09-111-6/+8
| | | | | | | | | | | | | The bio completion handlers can be run in any context, e.g. when using the old ide driver they run in hardirq context with irqs disabled so lockdep rightfully warns about using write_lock_irq useage in these handlers. This patch switches clear_extent_bit and set_extent_bit to write_lock_irqsave to fix this problem. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* [PATCH] btrfs: fix printk format warningChristoph Hellwig2007-09-111-1/+1
| | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Reorder tests in set_extent_bit to properly find holesChris Mason2007-09-111-22/+22
| | | | | | | | Yan Zheng noticed that set_extent_bit was exiting too early when there was a hole in the map. The fix is to reorder the tests to check for the hole first. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add more synchronization before creating a snapshotChris Mason2007-09-114-1/+13
| | | | | | | | File data checksums are only done during writepage, so we have to make sure all pages are written when the snapshot is taken. This also adds some locking so that new writes don't race in and add new dirty pages. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Add support for defragging files via btrfsctl -d. Avoid OOM on extent treeChris Mason2007-09-115-18/+100
| | | | | | defrag. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: remove extra drop_extent_cache callChris Mason2007-08-301-2/+0Star
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>