Skip to content

support stdin as source for ZFile compression#310

Merged
liulanzheng merged 1 commit intocontainerd:mainfrom
BigVan:zfile_stdin
Jan 25, 2024
Merged

support stdin as source for ZFile compression#310
liulanzheng merged 1 commit intocontainerd:mainfrom
BigVan:zfile_stdin

Conversation

@BigVan
Copy link
Copy Markdown
Member

@BigVan BigVan commented Jan 23, 2024

What this PR does / why we need it:
Currently, overlaybd-zfile cli only supports local files as a source.
This PR will support STDIN as a source for overlaybd-zfile cli. (eg. cat $file | ./overlaybd-file $out)
Moreover, decompression can't use stdin or pipe as a source since the ZFile index is saved at the end of the file

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

Comment thread src/overlaybd/zfile/zfile.cpp Outdated
if (ret == 0) {
break;
}
if (ret <= 0) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

< 0?

Copy link
Copy Markdown
Member

@liulanzheng liulanzheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@liulanzheng liulanzheng merged commit 08847cf into containerd:main Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants