Skip to content

Commit

Permalink
Always use blob id as the name of the filecache when use separate blob
Browse files Browse the repository at this point in the history
Before we only has one blob, called a data blob, so when generating a filecache,
we always used the id of this blob as the name of the filecache,
and later after supporting separate blobs, we has two blobs, one is a data blob,
the other is a meta blob, in order to maintain compatibility,
we should always use the data blob id as the filecache name, not the meta blob id.

Signed-off-by: zyfjeff <[email protected]>
  • Loading branch information
zyfjeff authored and imeoer committed Sep 25, 2023
1 parent 0cdf472 commit b777564
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/src/cache/filecache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ impl FileCacheEntry {
Arc::new(BlobStateMap::from(NoopChunkMap::new(true))) as Arc<dyn ChunkMap>;
(file, None, chunk_map, true, true, false)
} else {
let blob_file_path = format!("{}/{}", mgr.work_dir, blob_meta_id);
let blob_file_path = format!("{}/{}", mgr.work_dir, blob_id);
let (chunk_map, is_direct_chunkmap) =
Self::create_chunk_map(mgr, &blob_info, &blob_file_path)?;
// Validation is supported by RAFS v5 (which has no meta_ci) or v6 with chunk digest array.
Expand Down

0 comments on commit b777564

Please sign in to comment.