Commit Graph

103 Commits (4415143185b8c3ac799301a72a9cdbbd746fc723)

Author SHA1 Message Date
Yan Zheng 4415143185 Speed improvement and bug fixes for ext3 converter
This patch improves converter's allocator and fixes a bug in data relocation
function. The new allocator caches free blocks as Btrfs's default allocator.
In testing here, the user CPU time reduced to half of the original when
checksum and small file packing was disabled. This patch also enlarges the
size of block groups created by the converter.
2008-04-24 14:57:50 -04:00
Chris Mason 8bfbb6b6f8 Update the Ext3 converter
The main changes in this patch are adding chunk handing and data relocation
ability. In the last step of conversion, the converter relocates data in system
chunk and move chunk tree into system chunk. In the rollback process, the
converter remove chunk tree from system chunk and copy data back.

Regards
YZ
---
2008-04-22 14:06:56 -04:00
Chris Mason 588bb9dfff Add support for filesystem labels via mkfs.btrfs -L 2008-04-18 10:31:42 -04:00
Chris Mason d25165e95c Use device uuids when scanning devices 2008-04-18 10:31:42 -04:00
Chris Mason 1f81c1b6fc Add raid10 support 2008-04-16 11:14:21 -04:00
Chris Mason 951fd7371c Add chunk uuids and update multi-device back references
Block headers now store the chunk tree uuid

Chunk items records the device uuid for each stripes

Device extent items record better back refs to the chunk tree

Block groups record better back refs to the chunk tree

The chunk tree format has also changed.  The objectid of BTRFS_CHUNK_ITEM_KEY
used to be the logical offset of the chunk.  Now it is a chunk tree id,
with the logical offset being stored in the offset field of the key.

This allows a single chunk tree to record multiple logical address spaces,
upping the number of bytes indexed by a chunk tree from 2^64 to
2^128.
2008-04-15 15:42:08 -04:00
Chris Mason a37e1e7204 Recow all roots at the end of mkfs
The mkfs code bootstraps the filesystem on a single device.  Once
the raid block groups are setup, it needs to recow all of the blocks so
that each tree is properly allocated.
2008-04-04 15:42:17 -04:00
Chris Mason c7be130df7 Add support for single single duplication of metadata 2008-04-03 16:35:48 -04:00
Chris Mason a6de0bd778 Add mirroring support across multiple drives 2008-04-03 16:35:48 -04:00
Chris Mason ad67cd73b7 Update struct btrfs_header flags, and use it to indicate buffers are written 2008-04-01 10:20:06 -04:00
Chris Mason e9e3422f85 Implement raid0 when multiple devices are present
This defaults to striping across all devices
2008-03-25 16:50:20 -04:00
Chris Mason 0dcfa3b827 Walk all block devices looking for btrfs 2008-03-24 15:05:44 -04:00
Chris Mason 26afd0f31d ioctls to scan for btrfs filesystems 2008-03-24 15:04:49 -04:00
Chris Mason 1f3ba6a3f9 Btrfsck updates for multi-device filesystems 2008-03-24 15:04:37 -04:00
Chris Mason d12d4c7203 Dynamic chunk allocation 2008-03-24 15:03:58 -04:00
Chris Mason 510be29677 Add support for multiple devices per filesystem 2008-03-24 15:03:18 -04:00
Chris Mason aa69dec31c Add inode item and backref in one insert, reducing cpu usage 2008-01-29 15:15:18 -05:00
Chris Mason cbf87cad07 During deletes and truncate, remove many items at once from the tree 2008-01-29 15:11:36 -05:00
Chris Mason 80791984f6 Rename the extent_map code to extent_io
This mirrors the changes in the kernel code.
2008-03-04 11:16:54 -05:00
David Miller 8871a0eaa9 Unaligned access fixes
The first problem is that these SETGET macros lose typing information,
and therefore can't see the 'packed' attribute and therefore take
unaligned access SIGBUS signals on sparc64 when trying to derefernce
the member.

The next problem is a similar issue in btrfs_name_hash().  This gets
passed things like &key.offset which is a member of a packed
structure, losing this packed'ness information btrfs_name_hash()
performs a potentially unaligned memory access, again resulting in a
SIGBUS.
2008-02-15 11:19:58 -05:00
Chris Mason f64e047c7c Update magic 2008-02-04 10:11:12 -05:00
Chris Mason 8ee59c9f2a Change the magic to rev the disk format 2008-01-14 13:35:53 -05:00
Yan 3a3123bfc1 Add readonly inode flag
This patch adds readonly inode flag support.  A file with this flag
can't be modified, but can be deleted.
2008-01-14 13:35:00 -05:00
Yan b86a827172 A few update for btrfs-progs
Hello,

This patch adds inode flags definition to btrfs-progs and updates
extent-tree.c to match the kernel.
2008-01-08 15:55:08 -05:00
Yan 84b99666be Update find_free_extent for the ext3 conversion tool
This patch adds customized find_free_extent support to btrfs-progs,
the conversion program requires this.
2008-01-04 10:41:19 -05:00
Yan 7777e63b42 Update btrfs-progs to match kernel sources 2008-01-04 10:38:22 -05:00
Chris Mason 29bf1724b1 Reorder extent back refs to differentiate file data from btree blocks 2007-12-13 11:12:45 -05:00
Chris Mason 140d96a562 Create macros to generation set/get funcs for on disk structures 2007-12-12 14:39:46 -05:00
Chris Mason fba66bd865 Add back pointers from the inode to the directory that referenced it 2007-12-12 14:39:36 -05:00
Chris Mason 4122e65cb2 Add back pointers from extents to the file or btree referencing them 2007-12-11 09:21:42 -05:00
Chris Mason 73372dcf8f Add generation numbers to block pointers 2007-12-09 13:46:24 -05:00
Yan 07a4f1b81d Update btrfs-progs to better match the kernel 2007-12-05 10:41:38 -05:00
Chris Mason 1883251686 Add simple stripe size parameter 2007-11-30 11:30:24 -05:00
Josef Bacik e3815ddde6 xattr support for btrfs-progs 2007-11-16 11:46:07 -05:00
Chris Mason 678af9b3a4 Remove the last radix tree (block_group_cache) 2007-10-17 09:58:56 -04:00
Chris Mason 28de03cb0a Create a slightly more generic extent-caching structure 2007-10-15 16:25:41 -04:00
Chris Mason 38f79f9077 Switch to byte granular allocations 2007-10-15 16:25:14 -04:00
Chris Mason 08c66b7738 Stop using radix trees to record pending allocations 2007-10-15 16:25:04 -04:00
Chris Mason f12d799856 Allow large blocks 2007-10-15 16:24:39 -04:00
Josef Bacik ffaff17911 btrfs-progs support for root block accounting
This adds support for keeping track of the number of blocks used by
root_item's.  This makes it so that mkfs lays down the "default" subvol with
the correct block accounting in place.  Thank you,
2007-08-29 15:56:44 -04:00
Josef Bacik 4623a01bdc calculate checksums during IO 2007-06-28 16:20:29 -04:00
Chris Mason c3bbf0c093 disk format updates for finding dead roots 2007-06-22 14:37:48 -04:00
Chris Mason d9f1317c7d add GPLv2 2007-06-12 09:07:11 -04:00
Chris Mason b53a236c3e remove device tree 2007-06-09 09:22:37 -04:00
Chris Mason 84e9d08a4b endian fixes, makefile fixes 2007-06-07 22:12:21 -04:00
Chris Mason 9b25940b9d data vs metadata flag for block groups 2007-05-30 10:21:32 -04:00
Chris Mason 007e5efb9b allocator improvements, inode block groups 2007-04-30 15:25:49 -04:00
Chris Mason 5856b7e124 start of block group code 2007-04-26 16:46:06 -04:00
Chris Mason 10d06538f1 get rid of the extent_item type field 2007-04-24 12:09:01 -04:00
Chris Mason d7260c060c faster btrfsck 2007-04-23 15:56:27 -04:00