summaryrefslogtreecommitdiff
path: root/libbcachefs/lru.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-04-10 20:02:24 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2022-04-10 20:02:24 -0400
commit2668cb95d993740de7a104fb20f3a13bbfd0da5c (patch)
treeacbad1ef5abfc24c75bae564fe57ed9bc94939a0 /libbcachefs/lru.c
parentd256ebaa81b554305b57e9967626d53f399a1452 (diff)
Update bcachefs sources to 202b20c48f bcachefs: Ensure buckets have io_time[READ] set
Diffstat (limited to 'libbcachefs/lru.c')
-rw-r--r--libbcachefs/lru.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbcachefs/lru.c b/libbcachefs/lru.c
index ef4b4a9f..08437d4a 100644
--- a/libbcachefs/lru.c
+++ b/libbcachefs/lru.c
@@ -30,7 +30,7 @@ void bch2_lru_to_text(struct printbuf *out, struct bch_fs *c,
pr_buf(out, "idx %llu", le64_to_cpu(lru->idx));
}
-static int lru_delete(struct btree_trans *trans, u64 id, u64 idx, u64 time)
+int bch2_lru_delete(struct btree_trans *trans, u64 id, u64 idx, u64 time)
{
struct bch_fs *c = trans->c;
struct btree_iter iter;
@@ -73,7 +73,7 @@ err:
return ret;
}
-static int lru_set(struct btree_trans *trans, u64 lru_id, u64 idx, u64 *time)
+int bch2_lru_set(struct btree_trans *trans, u64 lru_id, u64 idx, u64 *time)
{
struct btree_iter iter;
struct bkey_s_c k;
@@ -120,8 +120,8 @@ int bch2_lru_change(struct btree_trans *trans, u64 id, u64 idx,
if (old_time == *new_time)
return 0;
- return lru_delete(trans, id, idx, old_time) ?:
- lru_set(trans, id, idx, new_time);
+ return bch2_lru_delete(trans, id, idx, old_time) ?:
+ bch2_lru_set(trans, id, idx, new_time);
}
static int bch2_check_lru_key(struct btree_trans *trans,