Commit Graph

67 Commits

Author SHA1 Message Date
Kent Overstreet
c25cc1b531 list_journal: Add -n for number of entries to print
The entire journal can be too big to fit in memory in textual form,
making grep difficult: this adds an option to print a specific number of
journal entries.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-04-12 16:38:10 -04:00
Kent Overstreet
986533d8d5 Update bcachefs sources to 6ddf061e68 bcachefs: Use a genradix for reading journal entries 2022-04-08 19:26:30 -04:00
Kent Overstreet
58867de5bd New tool for killing btree nodes on a filesystem
To be used by error injection tests.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-04-07 19:25:50 -04:00
Kent Overstreet
6692c6f9d3 cmd_list_journal: Tweak for new log entries
We use entry->level to denote which log entries indicate the start of a
transaction - this updates cmd_list_journal to format them correctly.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-03-30 20:31:28 -04:00
Kent Overstreet
e240b4ae86 Update bcachefs sources to f638850417 bcachefs: bch2_trans_log_msg() 2022-03-30 17:40:37 -04:00
Kent Overstreet
59abea5776 cmd_list_journal: Make output more readable
This puts a blank line before log entries, which are used to denote the
start of a transaction commit.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-03-29 15:07:59 -04:00
Kent Overstreet
e76dbf1abd cmd_debug: Add -j for dumping entire journal
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-03-20 02:39:38 -04:00
Kent Overstreet
465e90314c cmd_list_journal: Indicate which journal entries are blacklisted
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-03-02 15:25:57 -05:00
Aleksei Kharlamov
b1a2ab6eef Heap-allocate printbufs
Signed-off-by: Aleksei Kharlamov <aleksei@devass.club>
2022-02-26 21:31:27 +01:00
Kent Overstreet
5528e3ae62 Update bcachefs sources to 9b3aa5ec6c bcachefs: Add tabstops to printbufs 2022-02-22 04:56:09 -05:00
Kent Overstreet
f850624092 list_journal: tell recovery to only read the journal
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-02-19 05:18:08 -05:00
Kent Overstreet
0dc018fe08 list_journal: Improve formatting
log journal entries denote the start of a transaction commit - let's
indent them differently

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-02-19 04:12:15 -05:00
Kent Overstreet
a5cf18ffd4 list_journal: also print where entries were written
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-02-19 01:31:37 -05:00
Kent Overstreet
803d749d86 Use printbuf_indent_push
This properly indents multi-line printbuf output

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-02-16 06:45:04 -05:00
Kent Overstreet
a5bd96ff58 Improve the list_journal subcommand
This updates list_journal to use the new bch2_journal_entry_to_text()
pretty-printer.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2022-01-01 21:14:28 -05:00
Kent Overstreet
ad03173172 Update bcachefs sources to aa540d47ab bcachefs: Option improvements 2021-12-25 18:48:46 -05:00
Kent Overstreet
8d86f9c15d Fix uninitialized vars
This fixes crashes when listing btree nodes.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-11-15 15:19:44 -05:00
Kent Overstreet
3db6ec44c5 Update bcachefs sources to d9d1235f3c bcachefs: Handle transaction restarts in bch2_blacklist_entries_gc() 2021-10-20 12:36:50 -04:00
Kent Overstreet
e61b61c03b Update bcachefs sources to 386f00b639 bcachefs: Snapshot creation, deletion 2021-09-26 19:50:47 -04:00
Kent Overstreet
2b8c1bb091 Update bcachefs sources to 3f3f969859 bcachefs: Fix some compiler warnings 2021-09-09 19:10:07 -04:00
Kent Overstreet
7942d5cab4 Fix a missing free in dump_one_device()
Hopefully this will fix some OOMs

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-05-06 16:08:14 -04:00
Kent Overstreet
78905d7540 Change cmd_dump to use FSCK_OPT_NO
We just want cmd_dump to walk metadata, not fix errors - the mark and
sweep code is being fixed to make sure it continues on error.
2021-04-24 17:13:50 -04:00
Kent Overstreet
cb84ad03a5 cmd_list improvements
- update helptext
 - add -l (level) parameter

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2021-04-24 16:55:06 -04:00
Kent Overstreet
a2094890a9 Update bcachefs sources to 18686af684 bcachefs: Inode backpointers 2021-03-29 00:22:38 -04:00
Kent Overstreet
cc92b0f5a2 New data job command
This adds a new subcommand, bcachefs data job, that gives more direct
access to the data job/ioctl functionality, and hooks up the new rewrite
old nodes data job.
2021-03-16 21:46:21 -04:00
Kent Overstreet
9e5d774875 Update bcachefs sources to e2b8120595 bcachefs: Use x-macros for more enums 2021-02-20 22:34:09 -05:00
Kent Overstreet
4064aa126e Update bcachefs sources to 26409a8f75 bcachefs: Journal updates to dev usage 2021-02-02 16:07:59 -05:00
Kent Overstreet
4915b450e2 Improve some log messages 2020-11-13 16:45:21 -05:00
Kent Overstreet
a9a46467e6 Assorted debug and fsck improvements
This adds a new list mode to "bcachefs list", for printing out nodes as
they exist on disk (before being merge sorted). Also some improvements
to fsck return values.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2020-08-24 16:26:22 -04:00
Kent Overstreet
1d4bb7f4d1 Add an option to list_journal to list entire contents of journal 2020-06-15 16:27:30 -04:00
Kent Overstreet
90d54b3886 Improved functionality for cmd_list 2020-05-25 22:27:34 -04:00
Kent Overstreet
bbd44ea34f Improve list_journal command 2020-05-08 18:45:56 -04:00
Kent Overstreet
2dbedd962b Add a command for dumping contents of journal 2020-03-25 16:23:29 -04:00
Kent Overstreet
14e736e627 Change cmd_dump to not read in leaf nodes 2020-03-02 15:49:33 -05:00
Kent Overstreet
abbe66b6a5 Fix dump command for btree ptr key type change
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2020-01-04 15:46:31 -05:00
Kent Overstreet
ceee9244de Have cmd_dump fix errors
Some errors can't be ignored, and fsck and thus dump will only complete
if we're fixing errors.
2019-08-29 13:33:42 -04:00
Kent Overstreet
7e35389599 Update bcachefs sources to f38382c574 bcachefs: Improve key marking interface 2019-05-24 11:58:42 -04:00
Kent Overstreet
b485aae1ba Update bcachefs sources to 6f603b8d79 bcachefs: some improvements to startup messages and options 2019-04-17 19:00:38 -04:00
Kent Overstreet
133dfeb648 Update bcachefs sources to d868a87c67 bcachefs: fix initial gc 2019-03-28 05:28:38 -04:00
Kent Overstreet
99ccaf73a8 Update bcachefs sources to 2724e115d2 bcachefs: Lots of option handling improvements 2018-12-19 15:21:54 -05:00
Kent Overstreet
0c7db4eca3 Update bcachefs sources to 62de7539dc bcachefs: Make bkey types globally unique 2018-11-30 12:51:13 -05:00
Kent Overstreet
bdba182d10 Update bcachefs sources to d7dbddc450 bcachefs: revamp to_text methods 2018-11-09 04:06:53 -05:00
Kent Overstreet
55fbb25501 Update bcachefs sources to d7f6da1d60 bcachefs: fix missing include 2018-10-12 15:10:26 -04:00
Kent Overstreet
cef2f30ae2 Update bcachefs sources to 15f6e66e86 bcachefs: pass around bset_tree less 2018-08-15 20:00:21 -04:00
Kent Overstreet
ff86d47221 Update bcachefs sources to 0906b1fb49 bcachefs: fixes for 32 bit/big endian machines 2018-05-17 02:36:19 -04:00
Leah Neukirchen
79ce40239a list: fix usage header 2018-02-09 19:25:46 +01:00
Leah Neukirchen
06a81e6d29 list: document -f and -v 2018-02-09 19:25:17 +01:00
Leah Neukirchen
a2a99187c1 dump: document -f 2018-02-09 19:18:58 +01:00
Kent Overstreet
7875b82630 New data rereplicate command 2018-02-08 15:33:43 -05:00
Kent Overstreet
4de98a2712 Update bcachefs sources to 02ae70070a bcachefs: Allocate new btree roots lazily 2018-01-11 07:02:08 -05:00