diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-02-25 02:22:49 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:56 -0400 |
commit | 7635e1a6d6740ce76e1c2204f9237f01c98153b3 (patch) | |
tree | 4c4da48cc475344da4ab46bbc7afe509bf4a5d52 /fs/bcachefs/trace.h | |
parent | e53d03fe39f1458065ddb5f7309ade066ba6fb95 (diff) | |
download | lwn-7635e1a6d6740ce76e1c2204f9237f01c98153b3.tar.gz lwn-7635e1a6d6740ce76e1c2204f9237f01c98153b3.zip |
bcachefs: Rework open bucket partial list allocation
Now, any open_bucket can go on the partial list: allocating from the
partial list has been moved to its own dedicated function,
open_bucket_add_bucets() -> bucket_alloc_set_partial().
In particular, this means that erasure coded buckets can safely go on
the partial list; the new location works with the "allocate an ec bucket
first, then the rest" logic.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/trace.h')
-rw-r--r-- | fs/bcachefs/trace.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h index aae04d0619be..7e48e7676980 100644 --- a/fs/bcachefs/trace.h +++ b/fs/bcachefs/trace.h @@ -516,7 +516,6 @@ DEFINE_EVENT(bch_fs, gc_gens_end, DECLARE_EVENT_CLASS(bucket_alloc, TP_PROTO(struct bch_dev *ca, const char *alloc_reserve, - bool user, u64 bucket, u64 free, u64 avail, @@ -525,14 +524,13 @@ DECLARE_EVENT_CLASS(bucket_alloc, struct bucket_alloc_state *s, bool nonblocking, const char *err), - TP_ARGS(ca, alloc_reserve, user, bucket, free, avail, + TP_ARGS(ca, alloc_reserve, bucket, free, avail, copygc_wait_amount, copygc_waiting_for, s, nonblocking, err), TP_STRUCT__entry( __field(u8, dev ) __array(char, reserve, 16 ) - __field(bool, user ) __field(u64, bucket ) __field(u64, free ) __field(u64, avail ) @@ -550,7 +548,6 @@ DECLARE_EVENT_CLASS(bucket_alloc, TP_fast_assign( __entry->dev = ca->dev_idx; strscpy(__entry->reserve, alloc_reserve, sizeof(__entry->reserve)); - __entry->user = user; __entry->bucket = bucket; __entry->free = free; __entry->avail = avail; @@ -565,9 +562,8 @@ DECLARE_EVENT_CLASS(bucket_alloc, strscpy(__entry->err, err, sizeof(__entry->err)); ), - TP_printk("reserve %s user %u bucket %u:%llu free %llu avail %llu copygc_wait %llu/%lli seen %llu open %llu need_journal_commit %llu nouse %llu nocow %llu nonblocking %u err %s", + TP_printk("reserve %s bucket %u:%llu free %llu avail %llu copygc_wait %llu/%lli seen %llu open %llu need_journal_commit %llu nouse %llu nocow %llu nonblocking %u err %s", __entry->reserve, - __entry->user, __entry->dev, __entry->bucket, __entry->free, @@ -585,7 +581,6 @@ DECLARE_EVENT_CLASS(bucket_alloc, DEFINE_EVENT(bucket_alloc, bucket_alloc, TP_PROTO(struct bch_dev *ca, const char *alloc_reserve, - bool user, u64 bucket, u64 free, u64 avail, @@ -594,14 +589,13 @@ DEFINE_EVENT(bucket_alloc, bucket_alloc, struct bucket_alloc_state *s, bool nonblocking, const char *err), - TP_ARGS(ca, alloc_reserve, user, bucket, free, avail, + TP_ARGS(ca, alloc_reserve, bucket, free, avail, copygc_wait_amount, copygc_waiting_for, s, nonblocking, err) ); DEFINE_EVENT(bucket_alloc, bucket_alloc_fail, TP_PROTO(struct bch_dev *ca, const char *alloc_reserve, - bool user, u64 bucket, u64 free, u64 avail, @@ -610,7 +604,7 @@ DEFINE_EVENT(bucket_alloc, bucket_alloc_fail, struct bucket_alloc_state *s, bool nonblocking, const char *err), - TP_ARGS(ca, alloc_reserve, user, bucket, free, avail, + TP_ARGS(ca, alloc_reserve, bucket, free, avail, copygc_wait_amount, copygc_waiting_for, s, nonblocking, err) ); |