summaryrefslogtreecommitdiff
path: root/fs/btrfs/ctree.h
AgeCommit message (Collapse)AuthorFilesLines
2008-09-25Btrfs: Add support for multiple devices per filesystemChris Mason1-27/+286
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: checksum file data at bio submission time instead of during writepageChris Mason1-5/+3
When we checkum file data during writepage, the checksumming is done one page at a time, making it difficult to do bulk metadata modifications to insert checksums for large ranges of the file at once. This patch changes btrfs to checksum on a per-bio basis instead. The bios are checksummed before they are handed off to the block layer, so each bio is contiguous and only has pages from the same inode. Checksumming on a bio basis allows us to insert and modify the file checksum items in large groups. It also allows the checksumming to be done more easily by async worker threads. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: unaligned access fixesDavid Miller1-11/+6
Btrfs set/get macros lose type information needed to avoid unaligned accesses on sparc64. ere is a patch for the kernel bits which fixes most of the unaligned accesses on sparc64. btrfs_name_hash is modified to return the hash value instead of getting a return location via a (potentially unaligned) pointer. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix i_blocks accountingChris Mason1-0/+9
Now that delayed allocation accounting works, i_blocks accounting is changed to only modify i_blocks when extents inserted or removed. The fillattr call is changed to include the delayed allocation byte count in the i_blocks result. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Update magicChris Mason1-1/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add data block hints to SSD mode tooChris Mason1-0/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: mount -o max_inline=size to control the maximum inline extent sizeChris Mason1-0/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add inode item and backref in one insert, reducing cpu usageChris Mason1-3/+14
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: During deletes and truncate, remove many items at once from the treeChris Mason1-2/+10
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Split the extent_map code into two partsChris Mason1-7/+8
There is now extent_map for mapping offsets in the file to disk and extent_io for state tracking, IO submission and extent_bufers. The new extent_map code shifts from [start,end] pairs to [start,len], and pushes the locking out into the caller. This allows a few performance optimizations and is easier to use. A number of extent_map usage bugs were fixed, mostly with failing to remove extent_map entries when changing the file. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix hole insertion corner casesChris Mason1-0/+1
There were a few places that could cause duplicate extent insertion, this adjusts the code that creates holes to avoid it. lookup_extent_map is changed to correctly return all of the extents in a range, even when there are none matching at the start of the range. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add mount -o ssd, which includes optimizations for seek free storageChris Mason1-0/+2
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Run igrab on data=ordered inodes to prevent deadlocks during writeoutChris Mason1-1/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Rework btrfs_drop_inode to avoid schedulingChris Mason1-0/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add drop inode func to avoid data=ordered deadlockChris Mason1-0/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Change magic string to reflect new formatChris Mason1-1/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add readonly inode flagYan1-3/+3
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: Add flush barriers on commitChris Mason1-2/+3
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add inode flags supportYan1-1/+12
This patch adds NODATASUM & NODATACOW inode flags support. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add some simple throttling to wait for data=ordered and snapshot deletionChris Mason1-0/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add data=ordered supportChris Mason1-3/+4
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: Reduce stack usage in the resizer, fix 32 bit compilesChris Mason1-0/+1
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 Mason1-0/+1
testing Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Support for online FS resize (grow and shrink)Chris Mason1-0/+10
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Implement basic support for -ENOSPCChris Mason1-0/+4
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: Back port to 2.6.18-el kernelsChris Mason1-0/+13
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add mount option to enforce a max extent sizeChris Mason1-0/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add mount option to turn off data cowChris Mason1-0/+8
A number of workloads do not require copy on write data or checksumming. mount -o nodatasum to disable checksums and -o nodatacow to disable both copy on write and checksumming. In nodatacow mode, copy on write is still performed when a given extent is under snapshot. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add mount -o nodatasum to turn of file data checksummingChris Mason1-6/+8
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Reorder extent back refs to differentiate btree blocks from file dataChris Mason1-2/+2
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add back pointers from the inode to the directory that references itChris Mason1-2/+19
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add back pointers from extents to the btree or file referencing themChris Mason1-9/+32
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Implement generation numbers in block pointersChris Mason1-6/+41
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add simple stripe size parameterChris Mason1-0/+5
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25btrfs_drop_extents: make sure the item is getting smaller before truncateChris Mason1-1/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add block group pinned accounting backYan1-2/+3
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>
2008-09-25xattr support for btrfsJosef Bacik1-4/+18
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Fix recursive KM_USER1 usage in btrfs_realloc_nodeChris Mason1-8/+3
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Optimize allocations as we need to mix data and metadata into one groupChris Mason1-0/+2
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix a number of inline extent problems that Yan Zheng reported.Chris Mason1-1/+1
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>
2008-09-25Btrfs: Optimize csum insertion to create larger items when possibleChris Mason1-0/+1
This reduces the number of calls to btrfs_extend_item and greatly lowers the cpu usage while writing large files. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix typo: owner is a 64 bit fieldChris Mason1-2/+2
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Defrag only leaves, and only when the parent node has a single objectidChris Mason1-1/+2
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>
2008-09-25Btrfs: Add back metadata checksummingChris Mason1-0/+2
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Breakout BTRFS_SETGET_FUNCS into a separate C file, the inlines were too big.Chris Mason1-70/+4
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: extent_map optimizations to cut down on CPU usageChris Mason1-60/+14
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Allow tails larger than one pageChris Mason1-1/+1
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Cache extent buffer mappingsChris Mason1-4/+36
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Allow tree blocks larger than the page sizeChris Mason1-46/+66
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Change the remaining radix trees used by extent-tree.c to extent_map ↵Chris Mason1-9/+7
trees Signed-off-by: Chris Mason <chris.mason@oracle.com>