summaryrefslogtreecommitdiff
path: root/ctree.c
Commit message (Collapse)AuthorAge
* Update converter for the new formatYan Zheng2009-06-08
| | | | | Signed-off-by: Yan Zheng <zheng.yan@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Mixed back reference (FORWARD ROLLING FORMAT CHANGE)Chris Mason2009-06-08
| | | | | | | | | | | | | | | | | This commit introduces a new kind of back reference for btrfs metadata. Once a filesystem has been mounted with this commit, IT WILL NO LONGER BE MOUNTABLE BY OLDER KERNELS. The new back ref provides information about pointer's key, level and in which tree the pointer lives. This information allow us to find the pointer by searching the tree. The shortcoming of the new back ref is that it only works for pointers in tree blocks referenced by their owner trees. This is mostly a problem for snapshots, where resolving one of these fuzzy back references would be O(number_of_snapshots) and quite slow. The solution used here is to use the fuzzy back references in the common case where a given tree block is only referenced by one root, and use the full back references when multiple roots have a reference
* Add semantic checks to btrfsck for files and directoriesYan Zheng2009-01-07
| | | | | | | | | | | | | | | | This patch makes btrfsck check more things, including directory items, file extents, checksumming, inode link counts etc. The code for these checks is similar to the code verifies extent back references. The main difference is that shared tree blocks are treated specially. The partial checking results(unresolved references and/or errors) of shared sub-trees are cached. This avoids scanning the shared blocks several times. Thank you, Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
* Btrfs: update converter for the new disk formatYan Zheng2008-12-17
| | | | | | | | | | | This patch updates the ext3 to btrfs converter for the new disk format. This mainly involves changing the convert's data relocation and free space management code. This patch also ports some functions from kernel module to btrfs-progs. Thank you, Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
* update btrfs-progs for seed device supportYan Zheng2008-11-18
| | | | | | | | | | | | This patch does the following: 1) Update device management code to match the kernel code. 2) Allocator fixes. 3) Add a program called btrfstune to set/clear the SEEDING super block flags.
* Remove offset field from struct btrfs_extent_refYan Zheng2008-10-09
| | | | | | | | | | | | | | The offset field in struct btrfs_extent_ref records the position inside file that file extent is referenced by. In the new back reference system, tree leaves holding reference to file extent are recorded explicitly. We can quickly scan these tree leaves, so the offset field is not required. This patch also makes the back reference system check the objectid when extents are being deleted Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
* Full back reference supportZheng Yan2008-09-23
| | | | | | | | This patch makes the back reference system to explicit record the location of parent node for all types of extents. The location of parent node is placed into the offset field of backref key. Every time a tree block is balanced, the back references for the affected lower level extents are updated.
* Verify parent generation number on btree readsChris Mason2008-05-13
|
* Pass down the expected generation number when reading tree blocksChris Mason2008-05-12
|
* Fix balance_level to free the middle block if there is room in the left oneChris Mason2008-04-24
| | | | | | balance level starts by trying to empty the middle block, and then pushes from the right to the middle. This might empty the right block and leave a small number of pointers in the middle.
* Don't empty the middle buffer in push_nodes_for_insertChris Mason2008-04-24
|
* Keep more pointers free in the nodes for double splitsChris Mason2008-04-24
|
* Add chunk uuids and update multi-device back referencesChris Mason2008-04-15
| | | | | | | | | | | | | | | | | | 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.
* Change btrfs_map_block to return a structure with mappings for all stripesChris Mason2008-04-09
|
* Recow all roots at the end of mkfsChris Mason2008-04-04
| | | | | | 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.
* btrfs-progs: Fix printf format casting errorsAlex Chiang2008-04-01
| | | | | | | | | | | 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>
* Update struct btrfs_header flags, and use it to indicate buffers are writtenChris Mason2008-04-01
|
* Add support for multiple devices per filesystemChris Mason2008-03-24
|
* Call btrfs_cow_block while lowering tree level.Yan2008-02-01
| | | | | | | | 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.
* Copy correct tree when inserting into slot 0Chris Mason2008-01-30
|
* Add inode item and backref in one insert, reducing cpu usageChris Mason2008-01-29
|
* During deletes and truncate, remove many items at once from the treeChris Mason2008-01-29
|
* Remove kernel-space header in btrfs-progsYan2008-01-17
| | | | | | 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.
* Update btrfs-progs to match kernel sourcesYan2008-01-04
|
* Add back pointers from extents to the file or btree referencing themChris Mason2007-12-11
|
* Add generation numbers to block pointersChris Mason2007-12-09
|
* Update btrfs-progs to better match the kernelYan2007-12-05
|
* Switch to byte granular allocationsChris Mason2007-10-15
|
* Allow large blocksChris Mason2007-10-15
|
* add GPLv2Chris Mason2007-06-12
|
* start of block group codeChris Mason2007-04-26
|
* faster btrfsckChris Mason2007-04-23
|
* add owner and type fields to the extents aand block headersChris Mason2007-04-20
|
* bring back the inode number directory indexChris Mason2007-04-19
|
* rework csum and extent item orderingChris Mason2007-04-17
|
* drop owner and parentidChris Mason2007-04-10
|
* csum data struct changesChris Mason2007-03-29
|
* add generation to file extentsChris Mason2007-03-27
|
* minor commentsChris Mason2007-03-17
|
* transaction handles everywhereChris Mason2007-03-16
|
* pin freed blocks from the FS tree tooChris Mason2007-03-16
|
* add a name_len to dir items, reorder keyChris Mason2007-03-16
|
* Use a chunk of the key flags to record the item type.Chris Mason2007-03-15
| | | | | | Add (untested and simple) directory item code Fix comp_keys to use the new key ordering Add btrfs_insert_empty_item
* variable block size supportChris Mason2007-03-14
|
* merge leaves before splitChris Mason2007-03-13
|
* make some funcs staticChris Mason2007-03-13
|
* rename funcs and structs to btrfsChris Mason2007-03-13
|
* node->blockptrs endian fixesChris Mason2007-03-13
|
* struct item endian fixesChris Mason2007-03-12
|
* struct key endian fixesChris Mason2007-03-12
|