diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-10-24 16:59:33 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:15 -0400 |
commit | f3cf0999ac1c70676ba2b4d3db7b6f02f213a2d7 (patch) | |
tree | eea50a62094a645cc313476f942688ba3afff551 /fs/bcachefs/btree_gc.c | |
parent | 979735df980972dc9ffdaca8a5171664ac658248 (diff) | |
download | lwn-f3cf0999ac1c70676ba2b4d3db7b6f02f213a2d7.tar.gz lwn-f3cf0999ac1c70676ba2b4d3db7b6f02f213a2d7.zip |
bcachefs: bch2_btree_node_rewrite() now returns transaction restarts
We have been getting away from handling transaction restarts locally -
convert bch2_btree_node_rewrite() to the newer style.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/btree_gc.c')
-rw-r--r-- | fs/bcachefs/btree_gc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/bcachefs/btree_gc.c b/fs/bcachefs/btree_gc.c index 75d881b7a6c9..4fc882b15d93 100644 --- a/fs/bcachefs/btree_gc.c +++ b/fs/bcachefs/btree_gc.c @@ -817,15 +817,13 @@ static int bch2_gc_btree(struct bch_fs *c, enum btree_id btree_id, if (!initial) { if (max_stale > 64) - bch2_btree_node_rewrite(&trans, &iter, - b->data->keys.seq, + bch2_btree_node_rewrite(&trans, &iter, b, BTREE_INSERT_NOWAIT| BTREE_INSERT_GC_LOCK_HELD); else if (!bch2_btree_gc_rewrite_disabled && (bch2_btree_gc_always_rewrite || max_stale > 16)) bch2_btree_node_rewrite(&trans, &iter, - b->data->keys.seq, - BTREE_INSERT_NOWAIT| + b, BTREE_INSERT_NOWAIT| BTREE_INSERT_GC_LOCK_HELD); } } |