Age | Commit message (Collapse) | Author |
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
We weren't returning -BCH_ERR_backpointer_to_overwritten_btree_node from
bch2_backpointer_get_node - oops.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
New btree nodes dont't have allocation information written until the
node has been written, which means there's a race where the backpointer
for the old node points to a node that no longer exists.
bch2_backpointer_get_node() checks for this, but fsck uses
bch2_backpointer_get_key(); this patch updates
bch2_backpointer_get_key() to call get_node() on not found to
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
This is a no brainer, and makes the output of some of our tests easier
to manage.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
The new for_each_btree_key2() macro handles transaction retries,
allowing us to avoid nested transactions - which we want to avoid since
they're tricky to do completely correctly and upcoming assertions are
going to be checking for that.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
We shouldn't be using for_each_btree_key() here, we're always called
from contexts that already handle transaction restarts.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Better/more descriptive naming, and prep for adding
nested_lockrestart_do() and nested_commit_do().
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
There's no need to print fsck errors for errors that are expected, and
the user has already opted to repair.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
This patch adds backpointers: we now have a reverse index from device
and offset on that device (specifically, offset within a bucket) back to
btree nodes and (non cached) data extents.
The first 40 backpointers within a bucket are stored in the alloc key;
after that backpointers spill over to the next backpointers btree. This
is to help avoid performance regressions from additional btree updates
on large streaming workloads.
This patch adds all the code for creating, checking and repairing
backpointers. The next patch in the series is going to use backpointers
for copygc - finally getting rid of the need to scan all extents to do
copygc.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|