Commit 6e9d0558 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: bch2_trigger_alloc() handles state changes better



bch2_trigger_alloc() kicks off certain tasks on bucket state changes;
e.g. triggering the bucket discard worker and the invalidate worker.

We've observed the discard worker running too often - most runs it
doesn't do any work, according to the tracepoint - so clearly, we're
kicking it off too often.

This adds an explicit statechange() macro to make these checks more
precise.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent b63570f7
Supports Markdown
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