path: root/print-tree.c
Commit message (Collapse)AuthorAge
* btrfs-progs: pretty print key in extent_itemDavid Sterba2012-10-04
| | | | | Signed-off-by: David Sterba <> Signed-off-by: Chris Mason <>
* Btrfs progs: quota groups supportArne Jansen2012-09-04
| | | | | Signed-off-by: Jan Schmidt <> Signed-off-by: Arne Jansen <>
* Btrfs-progs: update btrfs-progs for subvol uuid+times supportAlexander Block2012-07-26
| | | | | | Update ctree.h and ioctl.h for the new uuid+times for subvolumes. Signed-off-by: Alexander Block <>
* Btrfs-progs: print inode transid and dir item data field in debug-treeAlexander Block2012-07-26
| | | | | | Add printing of inode transid and dir item data field. Signed-off-by: Alexander Block <>
* Btrfs-progs: make print-tree.c aware of free space cacheIlya Dryomov2012-03-13
| | | | | | | This adds proper formatting for free space and inode cache items in btrfs-debug-tree output. Signed-off-by: Ilya Dryomov <>
* btrfsck: add code to rebuild extent recordsChris Mason2012-02-07
| | | | | | | This also includes a new --repair btrfsck option. For now it can only fix errors in the extent allocation tree. Signed-off-by: Chris Mason <>
* Btrfs-progs: add restriper headersIlya Dryomov2012-02-03
| | | | | | Add restriper headers and update print-tree.c Signed-off-by: Ilya Dryomov <>
* Print the root generation in btrfs-debug-treeChris Mason2011-10-25
| | | | Signed-off-by: Chris Mason <>
* btrfs-progs: cast u64 to long long to avoid printf warningsAnton Blanchard2011-10-25
| | | | | | | | | | | | When building on ppc64 I hit a number of warnings in printf: btrfs-map-logical.c:69: error: format ‘%Lu’ expects type ‘long long unsigned int’, but argument 4 has type ‘u64’ Fix them. Signed-off-by: Anton Blanchard <> Signed-off-by: Hugo Mills <>
* Fix unused-but-set errors in gcc-4.6Chris Ball2011-10-25
| | | | | | | | | | | | | | | | gcc-4.6 (as shipped in Fedora) turns on -Wunused-but-set-variable by default, which breaks the build when combined with -Wall, e.g.: debug-tree.c: In function ‘print_extent_leaf’: debug-tree.c:45:13: error: variable ‘last_len’ set but not used [-Werror=unused-but-set-variable] debug-tree.c:44:13: error: variable ‘last’ set but not used [-Werror=unused-but-set-variable] debug-tree.c:41:21: error: variable ‘item’ set but not used [-Werror=unused-but-set-variable] cc1: all warnings being treated as errors This patch fixes the errors by removing the unused variables. Signed-off-by: Chris Ball <> Signed-off-by: Hugo Mills <>
* only print FIRST_CHUNK_TREE for chunk items in debug-treeSage Weil2010-09-23
| | | | | | | Otherwise we print FIRST_CHUNK_TREE for any objectid 256, which e.g. for the root tree is the first snap/subvol. Signed-off-by: Sage Weil <>
* Btrfs: add btrfs-debug-tree -b <block number> to print a single blockChris Mason2010-04-06
* 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
* Fix printf format casting errorsLuca Bruno2009-06-03
| | | | | | | | | | | | There are still some warnings of the form: format '%llu' expects type 'long long unsigned int' but argument has type 'u64' In conjunction with -Werror, this is causing some build failures. Now they're properly casted, avoiding compiler warnings. Signed-off-by: Luca Bruno <> Signed-off-by: Chris Mason <>
* Update btrfs-debug-tree to output more readable strings.Shen Feng2009-06-03
| | | | | | | | | | output objectid in btrfs_disk_key with human readable strings. Other updates are included for more readable output. Thanks Fengguang's fix to this patch. Signed-off-by: Shen Feng <> Signed-off-by: Chris Mason <>
* Fix print-tree.c to skip blocks it can't read instead of abortingChris Mason2009-05-13
* Add scan of the btrfs log tree to btrfs-debug-treeChris Mason2009-04-15
* debug-tree output tree/key type instead of idShen Feng2009-01-07
| | | | | | | This makes the tree name and key type output more readable. Signed-off-by: Shen Feng <>
* Btrfs: move data checksumming into a dedicated treeChris Mason2008-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Btrfs stores checksums for each data block. Until now, they have been stored in the subvolume trees, indexed by the inode that is referencing the data block. This means that when we read the inode, we've probably read in at least some checksums as well. But, this has a few problems: * The checksums are indexed by logical offset in the file. When compression is on, this means we have to do the expensive checksumming on the uncompressed data. It would be faster if we could checksum the compressed data instead. * If we implement encryption, we'll be checksumming the plain text and storing that on disk. This is significantly less secure. * For either compression or encryption, we have to get the plain text back before we can verify the checksum as correct. This makes the raid layer balancing and extent moving much more expensive. * It makes the front end caching code more complex, as we have touch the subvolume and inodes as we cache extents. * There is potentitally one copy of the checksum in each subvolume referencing an extent. The solution used here is to store the extent checksums in a dedicated tree. This allows us to index the checksums by phyiscal extent start and length. It means: * The checksum is against the data stored on disk, after any compression or encryption is done. * The checksum is stored in a central location, and can be verified without following back references, or reading inodes. This makes compression significantly faster by reducing the amount of data that needs to be checksummed. It will also allow much faster raid management code in general. The checksums are indexed by a key with a fixed objectid (a magic value in ctree.h) and offset set to the starting byte of the extent. This allows us to copy the checksum items into the fsync log tree directly (or any other tree), without having to invent a second format for them. Signed-off-by: Chris Mason <>
* Btrfs image toolYan Zheng2008-11-20
| | | | | | | | | This patch adds btrfs image tool. The image tool is a debugging tool that creates/restores btrfs metadump image. Signed-off-by: Yan Zheng <>
* Add disk format requirements for subvol backward and forward refsChris Mason2008-11-18
* Add fallocate support v2Yan Zheng2008-10-31
| | | | | | | This patch updates btrfs-progs for fallocate support. Signed-off-by: Yan Zheng <>
* Add disk format elements for compressionChris Mason2008-10-29
| | | | | Signed-off-by: Chris Mason <>
* 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 <>
* 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.
* btrfs-progs: add orphan support to print-treeJosef Bacik2008-07-30
| | | | | This adds orphan support to print-tree so when debug_tree hits an orphan item it will print out "orphan item" under it so you know what it is
* btrfs-progs new dir index supportJosef Bacik2008-07-24
* Pass down the expected generation number when reading tree blocksChris Mason2008-05-12
* 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.
* Btrfsck updates for multi-device filesystemsChris Mason2008-03-24
* Add support for multiple devices per filesystemChris Mason2008-03-24
* btrfs_print_node: don't use btrfs_item_key_to_cpu on nodesChris Mason2008-01-07
* Update btrfs-progs to match kernel sourcesYan2008-01-04
* Add back pointers from the inode to the directory that referenced itChris Mason2007-12-12
* Add back pointers from extents to the file or btree referencing themChris Mason2007-12-11
* Add generation numbers to block pointersChris Mason2007-12-09
* xattr support for btrfs-progsJosef Bacik2007-11-16
* Switch to byte granular allocationsChris Mason2007-10-15
* Allow large blocksChris Mason2007-10-15
* extra stats for btrfsck, link count in print-tree.cChris Mason2007-09-14
* add defrag ioctlChris Mason2007-08-07
* add GPLv2Chris Mason2007-06-12
* printf cleanupsChris Mason2007-06-12
* remove device treeChris Mason2007-06-09
* data vs metadata flag for block groupsChris Mason2007-05-30
* allocator improvements, inode block groupsChris Mason2007-04-30
* start of block group codeChris Mason2007-04-26
* get rid of the extent_item type fieldChris Mason2007-04-24
* add owner and type fields to the extents aand block headersChris Mason2007-04-20
* bring back the inode number directory indexChris Mason2007-04-19