Commit Graph

1 Commits

Author SHA1 Message Date
David Sterba d04d25fb14 btrfs-progs: add tool to edit super blocks
$ make btrfs-sb-mod
$ ./btrfs-sb-mod image field1 operation1 ...

Fields (only u64 supported for now):
 * total_bytes
 * root
 * generation
 * chunk_root
 * chunk_root_generation
 * cache_generation
 * uuid_tree_generation

Operations:
 * read value		?0
 * set value		=NUMBER
 * add to		+NUMBER
 * subtract from value	-NUMBER
 * xor with value	^NUMBER
 * byteswap (u64)	@0

Use with care!

Signed-off-by: David Sterba <dsterba@suse.com>
2018-03-30 22:15:55 +02:00