projects
/
platform
/
upstream
/
btrfs-progs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
btrfs-progs: image: pass rb_root to find_collisions
[platform/upstream/btrfs-progs.git]
/
cmds-inspect-dump-super.c
diff --git
a/cmds-inspect-dump-super.c
b/cmds-inspect-dump-super.c
index
98e0270
..
23a7115
100644
(file)
--- a/
cmds-inspect-dump-super.c
+++ b/
cmds-inspect-dump-super.c
@@
-33,7
+33,6
@@
#include "utils.h"
#include "commands.h"
#include "crc32c.h"
#include "utils.h"
#include "commands.h"
#include "crc32c.h"
-#include "cmds-inspect-dump-super.h"
#include "help.h"
static int check_csum_sblock(void *sb, int csum_size)
#include "help.h"
static int check_csum_sblock(void *sb, int csum_size)
@@
-119,7
+118,7
@@
static void print_sys_chunk_array(struct btrfs_super_block *sb)
len = btrfs_chunk_item_size(num_stripes);
if (cur_offset + len > array_size)
goto out_short_read;
len = btrfs_chunk_item_size(num_stripes);
if (cur_offset + len > array_size)
goto out_short_read;
- print_chunk(buf, chunk);
+ print_chunk
_item
(buf, chunk);
} else {
error("unexpected item type %u in sys_array at offset %u",
(u32)key.type, cur_offset);
} else {
error("unexpected item type %u in sys_array at offset %u",
(u32)key.type, cur_offset);
@@
-224,7
+223,7
@@
static struct readable_flag_entry incompat_flags_array[] = {
DEF_INCOMPAT_FLAG_ENTRY(DEFAULT_SUBVOL),
DEF_INCOMPAT_FLAG_ENTRY(MIXED_GROUPS),
DEF_INCOMPAT_FLAG_ENTRY(COMPRESS_LZO),
DEF_INCOMPAT_FLAG_ENTRY(DEFAULT_SUBVOL),
DEF_INCOMPAT_FLAG_ENTRY(MIXED_GROUPS),
DEF_INCOMPAT_FLAG_ENTRY(COMPRESS_LZO),
- DEF_INCOMPAT_FLAG_ENTRY(COMPRESS_
LZOv2
),
+ DEF_INCOMPAT_FLAG_ENTRY(COMPRESS_
ZSTD
),
DEF_INCOMPAT_FLAG_ENTRY(BIG_METADATA),
DEF_INCOMPAT_FLAG_ENTRY(EXTENDED_IREF),
DEF_INCOMPAT_FLAG_ENTRY(RAID56),
DEF_INCOMPAT_FLAG_ENTRY(BIG_METADATA),
DEF_INCOMPAT_FLAG_ENTRY(EXTENDED_IREF),
DEF_INCOMPAT_FLAG_ENTRY(RAID56),
@@
-519,8
+518,10
@@
int cmd_inspect_dump_super(int argc, char **argv)
while (1) {
int c;
while (1) {
int c;
+ enum { GETOPT_VAL_BYTENR = 257 };
static const struct option long_options[] = {
{"all", no_argument, NULL, 'a'},
static const struct option long_options[] = {
{"all", no_argument, NULL, 'a'},
+ {"bytenr", required_argument, NULL, GETOPT_VAL_BYTENR },
{"full", no_argument, NULL, 'f'},
{"force", no_argument, NULL, 'F'},
{"super", required_argument, NULL, 's' },
{"full", no_argument, NULL, 'f'},
{"force", no_argument, NULL, 'F'},
{"super", required_argument, NULL, 's' },
@@
-565,6
+566,11
@@
int cmd_inspect_dump_super(int argc, char **argv)
}
all = 0;
break;
}
all = 0;
break;
+ case GETOPT_VAL_BYTENR:
+ arg = arg_strtou64(optarg);
+ sb_bytenr = arg;
+ all = 0;
+ break;
default:
usage(cmd_inspect_dump_super_usage);
}
default:
usage(cmd_inspect_dump_super_usage);
}