Skip to content
Commit 468035ca authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Start gc, copygc, rebalance threads after initing writes ref



This fixes a bug where copygc would occasionally race with going
read-write and die, thinking we were read only, because it couldn't take
a ref on c->writes.

It's not necessary for copygc (or rebalance, or copygc) to take write
refs; they could run with BCH_TRANS_COMMIT_nocheck_rw, but this is an
easier fix that making sure that flag is passed correctly everywhere.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 202a7c29
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment