summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2008-09-25Btrfs: Add support for duplicate blocks on a single spindleChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add support for mirroring across drivesChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Properly dirty buffers in the split corner casesChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Verify checksums on tree blocks found without read_tree_blockChris Mason
Checksums were only verified by btrfs_read_tree_block, which meant the functions to probe the page cache for blocks were not validating checksums. Normally this is fine because the buffers will only be in cache if they have already been validated. But, there is a window while the buffer is being read from disk where it could be up to date in the cache but not yet verified. This patch makes sure all buffers go through checksum verification before they are used. This is safer, and it prevents modification of buffers before they go through the csum code. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Keep fs_mutex during reads done by snapshot deletionChris Mason
There was an optimization to drop the fs_mutex when doing snapshot deletion reads, but this can lead to false positives on checksumming errors. Keep the lock for now. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25btrfs-progs: Stop stomping on 'name' input parameterAlex Chiang
In btrfs_name_hash, Local variable 'buf' is declared as __u32 buf[2]; but we then try to do this: buf[0] = 0x67452301; buf[1] = 0xefcdab89; buf[2] = 0x98badcfe; buf[3] = 0x10325476; Oops. Fix buf to be the proper size. Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Correct usage of IS_ERR() in extent_io.cPeter
Signed-off-by: Peter Teoh <htmldeveloper@gmail.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Fix btrfs_fill_super to return -EINVAL when no FS foundYan
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Reorder the flags field in struct btrfs_header and record a flag on writeoutChris Mason
This allows detection of blocks that have already been written in the running transaction so they can be recowed instead of modified again. It is step one in trusting the transid field of the block pointers. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add leak debugging for extent_buffer and extent_stateChris Mason
This also fixes one leak around the super block when failing to mount the FS. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Use a higher default ra pagesChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Create a btrfs backing dev infoChris Mason
This allows intelligent versions of unplug and congestion functions Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Implement raid0 when multiple devices are presentChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add support for device scanning and detection ioctlsChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Bring back mount -o ssd optimizationsChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Move device information into the super block so it can be scannedChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Make the FS tree the last objectid in the tree of tree rootsChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Add /dev/btrfs-control for device scanning ioctlsChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Bring back find_free_extent CPU usage optimizationsChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Dynamic chunk and block group allocationChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25Btrfs: Add support for multiple devices per filesystemChris Mason
Signed-off-by: Chris Mason <chris.mason@oracle.com>
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>