Skip to content

Commit 9d42cb1

Browse files
author
伏鸾
committed
fix: #1423 zran check fail, because validate_header zran_count > chunk_count
1. targz-ref jump deduplicate chunk, because zran hasn't duplication 2. targz-ref rebuild filesystem chunk need not map Signed-off-by: 伏鸾 <[email protected]>
1 parent 9ab1ec1 commit 9d42cb1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

builder/src/core/node.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,9 @@ impl Node {
292292
}
293293

294294
// No need to perform chunk deduplication for tar-tarfs case.
295-
if ctx.conversion_type != ConversionType::TarToTarfs {
295+
if ctx.conversion_type != ConversionType::TarToTarfs
296+
&& ctx.conversion_type != ConversionType::TargzToRef
297+
{
296298
chunk = match self.deduplicate_chunk(
297299
ctx,
298300
blob_mgr,

rafs/src/metadata/direct_v6.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ impl RafsInodeExt for OndiskInodeWrapper {
13491349
blob_index, chunk_index
13501350
))
13511351
})
1352-
} else if state.is_tarfs() {
1352+
} else if state.is_tarfs() || state.meta.has_inlined_chunk_digest() {
13531353
let size = if idx == self.get_chunk_count() - 1 {
13541354
(self.size() % self.chunk_size() as u64) as u32
13551355
} else {

0 commit comments

Comments
 (0)