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
1b74adf90b
Change btrfs_map_block to return a structure with mappings for all stripes
2008-04-09 16:28:12 -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
Alex Chiang
857e9a2a63
btrfs-progs: Fix printf format casting errors
...
We get lots of warnings of the flavor:
utils.c:441: warning: format '%Lu' expects type 'long long unsigned int' but argument 2 has type 'u64'
And thanks to -Werror, the build fails. Clean up these printfs
by properly casting the arg to the format specified.
Signed-off-by: Alex Chiang <achiang@hp.com>
2008-04-01 10:52:22 -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
510be29677
Add support for multiple devices per filesystem
2008-03-24 15:03:18 -04:00
Yan
ece29db279
Call btrfs_cow_block while lowering tree level.
...
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.
2008-02-01 14:58:07 -05:00
Chris Mason
45391b1a98
Copy correct tree when inserting into slot 0
2008-01-30 11:43:54 -05: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
Yan
281c171293
Remove kernel-space header in btrfs-progs
...
When porting ctree.c in btrfs kernel module to btrfs-progs, I forgot
to remove a kernel-space header. This may cause compile error on some
system.
2008-01-17 12:23:34 -05:00
Yan
7777e63b42
Update btrfs-progs to match kernel sources
2008-01-04 10:38:22 -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
38f79f9077
Switch to byte granular allocations
2007-10-15 16:25:14 -04:00
Chris Mason
f12d799856
Allow large blocks
2007-10-15 16:24:39 -04:00
Chris Mason
d9f1317c7d
add GPLv2
2007-06-12 09:07:11 -04:00
Chris Mason
5856b7e124
start of block group code
2007-04-26 16:46:06 -04:00
Chris Mason
d7260c060c
faster btrfsck
2007-04-23 15:56:27 -04:00
Chris Mason
2f2264fc2d
add owner and type fields to the extents aand block headers
2007-04-20 20:23:29 -04:00
Chris Mason
07eb5008f3
bring back the inode number directory index
2007-04-19 15:41:24 -04:00
Chris Mason
8d1d13c786
rework csum and extent item ordering
2007-04-17 15:40:34 -04:00
Chris Mason
e52d2e2fa1
drop owner and parentid
2007-04-10 12:36:58 -04:00
Chris Mason
b21892315c
csum data struct changes
2007-03-29 15:15:49 -04:00
Chris Mason
03b3655fb4
add generation to file extents
2007-03-27 09:15:24 -04:00
Chris Mason
6fb67c4e82
minor comments
2007-03-17 14:29:23 -04:00
Chris Mason
f247156e4f
transaction handles everywhere
2007-03-16 16:20:31 -04:00
Chris Mason
3d8c87f4f7
pin freed blocks from the FS tree too
2007-03-16 08:56:18 -04:00
Chris Mason
80fabe2ee0
add a name_len to dir items, reorder key
2007-03-16 08:46:49 -04:00
Chris Mason
da99898c78
Use a chunk of the key flags to record the item type.
...
Add (untested and simple) directory item code
Fix comp_keys to use the new key ordering
Add btrfs_insert_empty_item
2007-03-15 12:56:47 -04:00
Chris Mason
7a0a809b4c
variable block size support
2007-03-14 14:14:43 -04:00
Chris Mason
6a332a71ba
merge leaves before split
2007-03-13 11:17:52 -04:00
Chris Mason
2c4257a341
make some funcs static
2007-03-13 11:09:37 -04:00
Chris Mason
aa60202f13
rename funcs and structs to btrfs
2007-03-13 10:46:10 -04:00
Chris Mason
3192451f58
node->blockptrs endian fixes
2007-03-13 09:28:32 -04:00
Chris Mason
f6a88938c6
struct item endian fixes
2007-03-12 20:12:07 -04:00
Chris Mason
b2e2afd7b4
struct key endian fixes
2007-03-12 16:22:34 -04:00
Chris Mason
8e17fab249
get/set for struct header fields
2007-03-12 12:01:18 -04:00
Chris Mason
4c4eac1f03
get rid of add recursion
2007-03-07 11:50:24 -05:00
Chris Mason
79b90e3fdf
Fixup reference counting on cows
2007-03-06 20:08:01 -05:00
Chris Mason
7da449a2f6
early reference counting
2007-03-02 16:08:05 -05:00
Chris Mason
11bc1cd2a5
Fix extent code to use merge during delete
...
Remove implicit commit in del_item and insert_item
Add implicit commit to close()
Add commit op in random-test
2007-03-02 09:47:58 -05:00
Chris Mason
a71a25da69
pretend page cache & commit code
2007-03-01 18:59:40 -05:00
Chris Mason
fa070f3071
Fixup the code to merge during path walks
...
Add a bulk insert/remove test to random-test
Add the quick-test code back as another regression test
2007-03-01 15:16:26 -05:00
Chris Mason
c6cc57e031
merge on the way down during deletes
2007-03-01 12:04:21 -05:00
Chris Mason
157a0bc7ce
more return code checking
2007-02-28 16:46:22 -05:00
Chris Mason
92ce8be120
return code checking
2007-02-28 16:35:06 -05:00
Chris Mason
0317678f00
Take out the merge-during-search-on-delete code, it is buggy.
2007-02-28 09:27:02 -05:00
Chris Mason
8f3b86bae3
Add fsx-style randomized tree tester
...
Add debug-tree command to print the tree
Add extent-tree.c to the repo
Comment ctree.h
2007-02-26 10:40:21 -05:00