summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
Commit message (Collapse)AuthorAgeFilesLines
* 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/+18
| | | | | 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/+1
| | | | | | | 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/+4
| | | | | | | | 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/+8
| | | | | | | 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/+0
| | | | 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-102-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-101-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-103-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-101-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-101-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-101-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-104-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-105-18/+100
| | | | | | defrag. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: remove extra drop_extent_cache callChris Mason2007-08-301-2/+0
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: fsx delalloc fixesChris Mason2007-08-303-174/+38
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add file data csums back in via hooks in the extent map codeChris Mason2007-08-303-14/+193
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Use mount -o subvol to select the subvol directory instead of dev:Chris Mason2007-08-292-10/+45
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix oopsen in extent_tree.c during enospcYan2007-08-291-3/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add mount into directory supportYan2007-08-291-3/+120
| | | | | | | | | | Modified form of original patch from Christoph Hellwig to make btrfs mount into the default subvolume by default. mount /dev/somedevice:subvolumename to get other subvolumes or mount /dev/somedevice:. to get the root Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix mknod to properly send rdev info back to diskYan2007-08-291-0/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: ctree.c cleanupsYan2007-08-291-6/+8
| | | | | | | Fixup a few buffer_head release errors, and fix an off by one in balance_node_right. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add per-root block accounting and sysfs entriesJosef Bacik2007-08-299-11/+393
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add delayed allocation to the extent based page tree codeChris Mason2007-08-276-135/+216
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Extent based page cache code. This uses an rbtree of extents and testsChris Mason2007-08-279-669/+2203
| | | | | | instead of buffer heads. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Make sure to cow the root during a snapshotChris Mason2007-08-271-0/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Do more extensive readahead during tree searchesChris Mason2007-08-273-16/+52
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* fix block readahead in btrfs_next_leafYan2007-08-271-1/+1
| | | | | | Send the correct slot down to reada_for_search Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: delay commits during fsync to allow more writersJosef Bacik2007-08-107-16/+66
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add BH_Defrag to mark buffers that are in need of defraggingChris Mason2007-08-104-11/+18
| | | | | | | | This allows the tree walking code to defrag only the newly allocated buffers, it seems to be a good balance between perfect defragging and the performance hit of repeatedly reallocating blocks. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Btree defrag on the extent-mapping tree as wellChris Mason2007-08-108-79/+125
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Further reduce the concurrency penalty of defrag and drop_snapshotChris Mason2007-08-083-12/+11
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Replace extent tree preallocation code with some bit radix magic.Chris Mason2007-08-085-195/+49
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Let some locks go during defrag and snapshot droppingChris Mason2007-08-083-4/+14
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add run time btree defrag, and an ioctl to force btree defragChris Mason2007-08-0711-89/+553
| | | | | | | | | | | This adds two types of btree defrag, a run time form that tries to defrag recently allocated blocks in the btree when they are still in ram, and an ioctl that forces defrag of all btree blocks. File data blocks are not defragged yet, but this can make a huge difference in sequential btree reads. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fold some btree readahead routines into something more generic.Chris Mason2007-08-074-96/+81
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Do snapshot deletion in smaller chunks.Chris Mason2007-08-074-31/+91
| | | | | | | | | Before, snapshot deletion was a single atomic unit. This caused considerable lock contention and required an unbounded amount of space. Now, the drop_progress field in the root item is used to indicate how far along snapshot deletion is, and to resume where it left off. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: cleaner make cleanJoel Becker2007-07-251-1/+1
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
OpenPOWER on IntegriCloud