Skip to contentSkip to conversation

bcachefs: Kill BTREE_TRIGGER_bucket_invalidate

PATCH Applied Alan Huang 2 participants 2 messages May 15, 2025

lore
Share & tools
lore

Alan Huang

author
#0 lore raw

PATCH 1/1 bcachefs: Kill BTREE_TRIGGER_bucket_invalidate

---
 fs/bcachefs/alloc_background.c | 9 ---------
 fs/bcachefs/btree_types.h      | 6 +-----
 2 files changed, 1 insertion(+), 14 deletions(-)
fs/bcachefs/alloc_background.c +0 -9
index 81e2ae4bb400..51dfd2f24c20 100644
@@ -914,15 +914,6 @@ int bch2_trigger_alloc(struct btree_trans *trans,
 				goto err;
 		}
 
-		if ((flags & BTREE_TRIGGER_bucket_invalidate) &&
-		    old_a->cached_sectors) {
-			ret = bch2_mod_dev_cached_sectors(trans, ca->dev_idx,
-					 -((s64) old_a->cached_sectors),
-					 flags & BTREE_TRIGGER_gc);
-			if (ret)
-				goto err;
-		}
-
 		ret = bch2_alloc_key_to_dev_counters(trans, ca, old_a, new_a, flags);
 		if (ret)
 			goto err;
fs/bcachefs/btree_types.h +1 -5
index 3acccca3b3a3..e5a965db68b4 100644
@@ -258,9 +258,6 @@ struct btree_node_iter {
  *
  * BTREE_TRIGGER_insert - @new is entering the btree
  * BTREE_TRIGGER_overwrite - @old is leaving the btree
- *
- * BTREE_TRIGGER_bucket_invalidate - signal from bucket invalidate path to alloc
- * trigger
  */
 #define BTREE_TRIGGER_FLAGS()			\
 	x(norun)				\
@@ -270,8 +267,7 @@ struct btree_node_iter {
 	x(gc)					\
 	x(insert)				\
 	x(overwrite)				\
-	x(is_root)				\
-	x(bucket_invalidate)
+	x(is_root)
 
 enum {
 #define x(n) BTREE_ITER_FLAG_BIT_##n,
Signature · 1 line
2.48.1
#1 lore raw
Quoted 1 line · Alan Huang

Applied

Quoted 52 lines
---
 fs/bcachefs/alloc_background.c | 9 ---------
 fs/bcachefs/btree_types.h      | 6 +-----
 2 files changed, 1 insertion(+), 14 deletions(-)
fs/bcachefs/alloc_background.c +0 -9
index 81e2ae4bb400..51dfd2f24c20 100644
@@ -914,15 +914,6 @@ int bch2_trigger_alloc(struct btree_trans *trans,
 				goto err;
 		}
 
-		if ((flags & BTREE_TRIGGER_bucket_invalidate) &&
-		    old_a->cached_sectors) {
-			ret = bch2_mod_dev_cached_sectors(trans, ca->dev_idx,
-					 -((s64) old_a->cached_sectors),
-					 flags & BTREE_TRIGGER_gc);
-			if (ret)
-				goto err;
-		}
-
 		ret = bch2_alloc_key_to_dev_counters(trans, ca, old_a, new_a, flags);
 		if (ret)
 			goto err;
fs/bcachefs/btree_types.h +1 -5
index 3acccca3b3a3..e5a965db68b4 100644
@@ -258,9 +258,6 @@ struct btree_node_iter {
  *
  * BTREE_TRIGGER_insert - @new is entering the btree
  * BTREE_TRIGGER_overwrite - @old is leaving the btree
- *
- * BTREE_TRIGGER_bucket_invalidate - signal from bucket invalidate path to alloc
- * trigger
  */
 #define BTREE_TRIGGER_FLAGS()			\
 	x(norun)				\
@@ -270,8 +267,7 @@ struct btree_node_iter {
 	x(gc)					\
 	x(insert)				\
 	x(overwrite)				\
-	x(is_root)				\
-	x(bucket_invalidate)
+	x(is_root)
 
 enum {
 #define x(n) BTREE_ITER_FLAG_BIT_##n,
Signature · 1 line
2.48.1