aboutsummaryrefslogtreecommitdiff
path: root/fs
AgeCommit message (Collapse)Author
2008-09-25Btrfs: Create extent_buffer interface for large blocksizesChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25btrfs_get_extent should treat inline extents as though they hold a whole blockChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: factor page private preparations into a helperChristoph Hellwig
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix double free and off by one in inode.cYan
The first change removes potential double free, the second fix a off by one error. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: truncate: don't update inode->i_blocks when extent is a holeYan
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>
2008-09-25create btrfs_path slab with the correct sizeYan
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25fix found_type decrement in btrfs_truncate_in_transYan
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>
2008-09-25Btrfs: Fix duplicate ENOSPC checks in find_free_extentChris Mason
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>
2008-09-25Btrfs: Use balance_dirty_pages_nr on btree blocksChris Mason
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>
2007-09-14Btrfs: Fix cache_block_group to catch holes at the start of the groupYan
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>
2007-09-14Btrfs: Fix off by one error in dirty_and_release_pagesYan
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-09-14split up btrfs_ioctlChristoph Hellwig
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>
2007-09-14Btrfs: use unlocked_ioctlChristoph Hellwig
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>
2007-09-14Btrfs: Simplify makefileJan Engelhardt
Single-colons will do here. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-09-14Btrfs: add modules_install targetChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-09-14Btrfs: Fix extra link count dec in renameChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-09-11Btrfs: Find and remove dead roots the first time a root is loaded.Chris Mason
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>
2007-09-10Btrfs: [PATCH] extent_map: add writepage_end_io hookChristoph Hellwig
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>
2007-09-10Btrfs: [PATCH] extent_map: make the writepage_io hook optionalChristoph Hellwig
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>
2007-09-10Btrfs: [PATCH] extent_map: provide generic bmapChristoph Hellwig
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>
2007-09-10Btrfs: [PATCH] extent_map: fix locking for bio completionChristoph Hellwig
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>
2007-09-10[PATCH] btrfs: fix printk format warningChristoph Hellwig
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-09-10Btrfs: Reorder tests in set_extent_bit to properly find holesChris Mason
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>
2007-09-10Btrfs: Add more synchronization before creating a snapshotChris Mason
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>
2007-09-10Add support for defragging files via btrfsctl -d. Avoid OOM on extent treeChris Mason
defrag. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-30Btrfs: remove extra drop_extent_cache callChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-30Btrfs: fsx delalloc fixesChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-30Btrfs: Add file data csums back in via hooks in the extent map codeChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-29Btrfs: Use mount -o subvol to select the subvol directory instead of dev:Chris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-29Btrfs: Fix oopsen in extent_tree.c during enospcYan
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-29Btrfs: Add mount into directory supportYan
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>
2007-08-29Btrfs: Fix mknod to properly send rdev info back to diskYan
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-29Btrfs: ctree.c cleanupsYan
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>
2007-08-29Btrfs: Add per-root block accounting and sysfs entriesJosef Bacik
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-27Btrfs: Add delayed allocation to the extent based page tree codeChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-27Btrfs: Extent based page cache code. This uses an rbtree of extents and testsChris Mason
instead of buffer heads. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-27Btrfs: Make sure to cow the root during a snapshotChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-27Btrfs: Do more extensive readahead during tree searchesChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-27fix block readahead in btrfs_next_leafYan
Send the correct slot down to reada_for_search Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-10Btrfs: delay commits during fsync to allow more writersJosef Bacik
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-10Btrfs: Add BH_Defrag to mark buffers that are in need of defraggingChris Mason
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>
2007-08-10Btrfs: Btree defrag on the extent-mapping tree as wellChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-08Btrfs: Further reduce the concurrency penalty of defrag and drop_snapshotChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-08Btrfs: Replace extent tree preallocation code with some bit radix magic.Chris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-08Btrfs: Let some locks go during defrag and snapshot droppingChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-07Btrfs: Add run time btree defrag, and an ioctl to force btree defragChris Mason
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>
2007-08-07Btrfs: Fold some btree readahead routines into something more generic.Chris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-08-07Btrfs: Do snapshot deletion in smaller chunks.Chris Mason
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>
2007-07-25Btrfs: cleaner make cleanJoel Becker
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2007-07-25Btrfs: deal with api changes in 2.6.23-rc1Chris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>