diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-02-10 20:32:37 -0500 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-03-14 21:02:14 -0400 |
| commit | cc297dfb41834f91cf594893dfff7ebe321190eb (patch) | |
| tree | 26ae3f69d0cba57b1e586bb98b16f8cb9fe7424d /fs/bcachefs/buckets.c | |
| parent | bcachefs: Rework bch2_check_lru_key() (diff) | |
| download | linux-cc297dfb41834f91cf594893dfff7ebe321190eb.tar.gz linux-cc297dfb41834f91cf594893dfff7ebe321190eb.zip | |
bcachefs: bch2_trigger_stripe_ptr() no longer uses ec_stripes_heap_lock
Introduce per-entry locks, like with struct bucket - the stripes heap is
going away.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/buckets.c')
| -rw-r--r-- | fs/bcachefs/buckets.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c index 345b117a4a4a..88af61bc799d 100644 --- a/fs/bcachefs/buckets.c +++ b/fs/bcachefs/buckets.c @@ -674,10 +674,10 @@ err: return -BCH_ERR_ENOMEM_mark_stripe_ptr; } - mutex_lock(&c->ec_stripes_heap_lock); + gc_stripe_lock(m); if (!m || !m->alive) { - mutex_unlock(&c->ec_stripes_heap_lock); + gc_stripe_unlock(m); struct printbuf buf = PRINTBUF; bch2_bkey_val_to_text(&buf, c, k); bch_err_ratelimited(c, "pointer to nonexistent stripe %llu\n while marking %s", @@ -693,7 +693,7 @@ err: .type = BCH_DISK_ACCOUNTING_replicas, }; memcpy(&acc.replicas, &m->r.e, replicas_entry_bytes(&m->r.e)); - mutex_unlock(&c->ec_stripes_heap_lock); + gc_stripe_unlock(m); acc.replicas.data_type = data_type; int ret = bch2_disk_accounting_mod(trans, &acc, §ors, 1, true); |
