Skip to content

Commit

Permalink
feat: support the arg batch-size for small chunks mergence in nydus-i…
Browse files Browse the repository at this point in the history
…mage pack

Signed-off-by: Desiki-high <2448906309@qq.com>
  • Loading branch information
Desiki-high committed Apr 11, 2023
1 parent 669d9c6 commit e0a2361
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/driver/nydus/nydus.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ type Driver struct {
docker2oci bool
alignedChunk bool
chunkSize string
batchSize string
prefetchPatterns string
backend backend.Backend
platformMC platforms.MatchComparer
Expand Down Expand Up @@ -109,6 +110,7 @@ func New(cfg map[string]string, platformMC platforms.MatchComparer) (*Driver, er
}

fsChunkSize := cfg["fs_chunk_size"]
BatchSize := cfg["batch_size"]
prefetchPatterns := cfg["prefetch_patterns"]

fsVersion := cfg["fs_version"]
Expand Down Expand Up @@ -151,6 +153,7 @@ func New(cfg map[string]string, platformMC platforms.MatchComparer) (*Driver, er
docker2oci: docker2oci,
alignedChunk: fsAlignChunk,
chunkSize: fsChunkSize,
batchSize: BatchSize,
prefetchPatterns: prefetchPatterns,
backend: _backend,
platformMC: platformMC,
Expand Down Expand Up @@ -203,6 +206,7 @@ func (d *Driver) convert(ctx context.Context, provider accelcontent.Provider, so
OCIRef: d.ociRef,
AlignedChunk: d.alignedChunk,
ChunkSize: d.chunkSize,
BatchSize: d.batchSize,
}
mergeOpt := nydusify.MergeOption{
WorkDir: packOpt.WorkDir,
Expand Down

0 comments on commit e0a2361

Please sign in to comment.