summaryrefslogtreecommitdiff
path: root/fs
AgeCommit message (Collapse)Author
2008-09-25Match the extent tree code to btrfs-progs for multi-device mergingChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Use KM_USERN instead of KM_IRQ during data summingChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Disable sysfs files on older kernelsChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Make sure bio pages are adjacent during bulk csummingChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Misc 2.6.25 updatesChris Mason
Remove the btrfs read_inode method, and use save_mount_options Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25btrfs: fixes for kobject changes in mainlineGreg KH
Here's a patch against the unstable tree that gets the code to build against Linus's current tree (2.6.24-git12). This is needed as the kobject/kset api has changed there. I tried to make the smallest changes needed, and it builds and loads successfully, but I don't have a btrfs volume anywhere (yet) to try to see if things still work properly :) Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: While doing checksums on bios, cache the extent_buffer mappingChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: checksum file data at bio submission time instead of during writepageChris Mason
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: Properly cast before shiftingChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Take the extent lock before dropping the delalloc bitsChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix looping on readdir of the subvol rootsYan Zheng
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Properly clear dirty and delalloc extent bits while preparing the ↵Chris Mason
file for write Yan Zheng noticed that we don't clear the extent state tree dirty and delalloc bits when we clear the dirty bits on the page during file write. This leads to csum errors later on. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Remove extent back refs in batches, and avoid duplicate searchesChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Allocator improvementsChris Mason
Reduce CPU time searching for free blocks by optimizing find_first_extent_bit Fix find_free_extent to make better use of the last_alloc hint. Before it was often finding blocks just before the hint. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Disable tree defrag in SSD modeChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: unaligned access fixesDavid Miller
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 "no csum found for inode" issue.Yan
A few codes were not properly updated for changes of extent map. This may be the causes of "no csum found for inode" issue. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix i_blocks accountingChris Mason
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: Create larger bios for btree blocksChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Don't case unsigned long to int in bio submissionChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Use 2MB as the empty_size for clustered allocationsChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25btrfs_drop_extents: handle BTRFS_INODE_REF_KEY typesYan
It's possible "key.type == BTRFS_INODE_REF_KEY" and "key.offset >= end". Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add checks for last byte in disk to allocator groupingChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix hole creation in file_writeYan
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Update magicChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add debugging for block group update failureChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix typo in extent_io.cYan
--- Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Lower stack usage in transaction.cChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Fix delalloc account on state deletionChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Call btrfs_cow_block while lowering tree level.Yan
When freeing root block of a tree, btrfs_free_extent' parameter 'ref_generation' is from root block itseft. When freeing non-root block, 'ref_generation' is from its parent. so when converting a non-root block to root block, we must guarantee its generation is equal to its parent's generation. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Use last_alloc optimizations for metadata, even without -o ssdChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Hash in the offset and owner for file extent backref keysChris Mason
This makes searches for backrefs and backref insertion much more efficient when there are many backrefs for a single extent Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Insert extent record and the first backref in a single balanceChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add a lookup cache to the extent state treeChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add data block hints to SSD mode tooChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Enable delalloc accountingChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25btrfs_drop_extent fixe for inline items > 8KYan
When truncating a inline extent, btrfs_drop_extents doesn't properly handle the case "key.offset > inline_limit". This bug can only happen when max line size is larger than 8K. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Fix hole start calculation in btrfs_settarChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Properly align the hole size in btrfs_setattrChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Align extent length to sectorsize inYan
--- Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Copy correct tree when inserting into slot 0Chris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Leave on the tree defragger in mount -o ssd, it still helps thereChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: mount -o max_inline=size to control the maximum inline extent sizeChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Do delalloc accounting via hooks in the extent_state codeChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add inode item and backref in one insert, reducing cpu usageChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: During deletes and truncate, remove many items at once from the treeChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: extent_io and extent_state optimizationsChris Mason
The end_bio routines are changed to take a pointer to the extent state struct, and the state tree is walked in order to set/clear appropriate bits as IO completes. This greatly reduces the number of rbtree searches done by the end_bio handlers, and reduces lock contention. The extent_io releasepage function is changed to avoid expensive searches for locked state. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add some extra debugging around file data checksum failuresChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Force f_pos to the max when a readdir hits the end of the directory.Chris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Tune readahead during defrag to avoid reading too much at onceChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>