diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-30 06:29:24 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-08 23:29:21 +0200 |
commit | c02eb9e89184bd016d3c907d1287d05430b2016b (patch) | |
tree | 09b94a93e601e9dcebebfcd330303ea40c2c5ae7 /fs/bcachefs/ec.c | |
parent | bcachefs: alloc_data_type_set() (diff) | |
download | linux-c02eb9e89184bd016d3c907d1287d05430b2016b.tar.xz linux-c02eb9e89184bd016d3c907d1287d05430b2016b.zip |
bcachefs: kill bch2_dev_usage_update_m()
by using bucket_m_to_alloc() more, we can get some nice code cleanup.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to '')
-rw-r--r-- | fs/bcachefs/ec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c index a4ae39b10e98..ce82cef1267d 100644 --- a/fs/bcachefs/ec.c +++ b/fs/bcachefs/ec.c @@ -307,7 +307,7 @@ err: struct bucket *g = gc_bucket(ca, bucket.offset); bucket_lock(g); - struct bucket old = *g; + struct bch_alloc_v4 old = bucket_m_to_alloc(*g); u8 data_type = g->data_type; int ret = __mark_stripe_bucket(trans, s, ptr_idx, deleting, bucket, @@ -318,10 +318,10 @@ err: &g->stripe, &g->stripe_redundancy); g->data_type = data_type; - struct bucket new = *g; + struct bch_alloc_v4 new = bucket_m_to_alloc(*g); bucket_unlock(g); if (!ret) - bch2_dev_usage_update_m(c, ca, &old, &new); + bch2_dev_usage_update(c, ca, &old, &new, 0, true); percpu_up_read(&c->mark_lock); return ret; } |