commit 85ff1381801100535ac272abc6ff359e986f9bf2
parent 8c2f8215f75e4570f9971d1bd637ff80114cd096
Author: sin <sin@2f30.org>
Date: Sat, 30 Mar 2019 16:18:09 +0000
Rename some icache related functions
Diffstat:
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dedup.c b/dedup.c
@@ -220,14 +220,14 @@ dedup_chunk(struct snap *snap, uint8_t *chunkp, size_t chunk_size)
snap_hdr.st.compr_size += n;
memcpy(blk_desc.md, md, sizeof(blk_desc.md));
- if (lookup_icache_entry(icache, &blk_desc) < 0) {
+ if (lookup_icache(icache, &blk_desc) < 0) {
blk_desc.offset = blk_hdr.size;
blk_desc.size = n;
snap->blk_desc[snap->nr_blk_descs++] = blk_desc;
append_blk(compr_buf, &blk_desc);
- add_icache_entry(icache, &blk_desc);
+ insert_icache(icache, &blk_desc);
icache_misses++;
snap_hdr.st.dedup_size += blk_desc.size;
@@ -372,7 +372,7 @@ build_icache(struct snap *snap, void *arg)
struct blk_desc *blk_desc;
blk_desc = &snap->blk_desc[i];
- add_icache_entry(icache, blk_desc);
+ insert_icache(icache, blk_desc);
}
free(buf);
return WALK_CONTINUE;
diff --git a/dedup.h b/dedup.h
@@ -73,8 +73,8 @@ extern int verbose;
/* icache.c */
struct icache *alloc_icache(void);
void free_icache(struct icache *icache);
-void add_icache_entry(struct icache *icache, struct blk_desc *desc);
-int lookup_icache_entry(struct icache *icache, struct blk_desc *desc);
+void insert_icache(struct icache *icache, struct blk_desc *desc);
+int lookup_icache(struct icache *icache, struct blk_desc *desc);
/* chunker.c */
struct chunker *alloc_chunker(int fd, size_t min_size, size_t max_size,
diff --git a/icache.c b/icache.c
@@ -76,7 +76,7 @@ free_icache(struct icache *icache)
}
void
-add_icache_entry(struct icache *icache, struct blk_desc *desc)
+insert_icache(struct icache *icache, struct blk_desc *desc)
{
struct node *node;
@@ -86,7 +86,7 @@ add_icache_entry(struct icache *icache, struct blk_desc *desc)
}
int
-lookup_icache_entry(struct icache *icache, struct blk_desc *desc)
+lookup_icache(struct icache *icache, struct blk_desc *desc)
{
struct node *node, key;