summaryrefslogtreecommitdiff
path: root/cmds-inspect-dump-super.c
Commit message (Collapse)AuthorAge
* btrfs-progs: dump-super: add missing long option bytenr to getoptMisono, Tomohiro2017-08-24
| | | | | | | This fixes "btrfs inspect-internal dump-super --bytenr" Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: move command definitions to commands.hDavid Sterba2017-08-24
| | | | | | | There are some trivial helpers, we can group the command declarations in one place. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Remove deprecated leafsize usageQu Wenruo2017-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | Leafsize is deprecated for a long time, and kernel has already updated ctree.h to rename sb->leafsize to sb->__unused_leafsize. This patch will remove normal users of leafsize: 1) Remove leafsize member from btrfs_root structure Now only root->nodesize and root->sectorisze. No longer root->leafsize. 2) Remove @leafsize parameter from btrfs_setup_root() function Since no root->leafsize, no need for @leafsize parameter. The remaining user of leafsize will be: 1) btrfs inspect-internal dump-super Reformat the "leafsize" output to "leafsize (deprecated)" and use le32_to_cpu() to do the cast manually. 2) mkfs We still need to set sb->__unused_leafsize to nodesize. Do the manual cast too. 3) convert Same as mkfs, these two superblock setup should be merged later Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: print-tree: add validation to print_chunkLu Fengqi2017-04-20
| | | | | | | | | | | In print_chunk, validate the value of uuid_offset when read the dev_uuid of stripe. Was triggered by misc-test/015-dump-super-garbage running indefinetelly. Issue: #37 Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: dump-super: check array_size in print_sys_chunk_arrayLu Fengqi2017-04-20
| | | | | | | | Without validation of array_size, the dump-super may lead to a bad memory access. Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: remove unused argument from btrfs_csum_dataDavid Sterba2017-03-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: move help defines to own headerDavid Sterba2017-03-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: format FREE_SPACE_TREE{,_VALID} nicely in dump-superOmar Sandoval2016-11-23
| | | | | Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: dump-super: print chunks after validationDavid Sterba2016-10-05
| | | | | | | The fuzz test 005-simple-dump-super hits a crash, because we print the chunks too early. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: change btrfs_csum_final result param type to u8Domagoj Tršan2016-10-03
| | | | | Signed-off-by: Domagoj Tršan <domagoj.trsan@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: dump-super: switch to common message helpersDavid Sterba2016-10-03
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: dump-super: changes in options to specify superblocksDavid Sterba2016-09-21
| | | | | | | | | | | | Some tools (check, select-super, dump-super) can use the alternate superblocks, but the options are not consistent. To make it less confusing, change the meaning of option -s in 'dump-super' to specify the superblock copy, instead of taking the offset. Though this is a change in UI, the old usage is detected and the result would be the same, no breakage in existing scripts. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: dump-super: detect invalid checksum typeDavid Sterba2016-09-05
| | | | | | | | | The helper btrfs_super_csum_size unconditionally bugs on a bogus value, the dump-super is supposed to dump even corrupted superblocks so this must not happen here. Group the checsum values in the output and be more robust agains garbage values. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: drop permission arg from non-creating openDavid Sterba2016-09-05
| | | | | | The permissions do not make sense without O_CREATE mode. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: dump-super: add more long optionsDavid Sterba2016-03-15
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: dump-super: switch to getopt_longDavid Sterba2016-03-15
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: switch more error messages to common helpersDavid Sterba2016-03-14
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: introduce inspect-internal dump-superAlexander Fougner2016-03-14
The long-term plan is to merge the features of standalone tools into the btrfs binary, reducing the number of shipped binaries. Signed-off-by: Alexander Fougner <fougner89@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>