Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/0.4] Backport fixes from v0.5.1 to 0.4 #222

Merged
merged 4 commits into from Oct 15, 2021

Conversation

kevpar and others added 4 commits October 15, 2021 14:47
These packages had incorrect error handling for their generated syscall
bindings. The functions they were calling returned errors directly, but
the binding was written such that the generated code was calling
GetLastError instead.

Thankfully, this did not affect the detection of whether or not an error
had occurred, it only caused the value returned in the case of an error
to be not the right error code.

Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
(cherry picked from commit 9f0ab2c)
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
(cherry picked from commit 0b148d1)
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
A recent OS change altered how sparse files are represented in backup
streams. This caused backuptar to no longer work with certain files. The
specific behavior that changed is as follows:
- Empty sparse files (size = 0), previously did not have any data or
  sparse block streams in the backup stream. Now, they will have a
  data stream with size = 0, and no sparse block streams.
- Sparse files with a single allocated range (e.g. a normal file that
  has the sparse attribute set) previously would not show as sparse in
  the backup stream. Now, they will show as sparse.

The old backuptar behavior assumed that if the sparse flag was set on
the data stream, then there would always be a set of sparse blocks
following. These changes break this assumption, and so require special
handling.

It is unsupported to have a data stream, marked sparse, that contains
file content AND a series of sparse block streams following. As far as
I can tell this is not a valid case for backup streams.

This change also cleans up some code and error messages, and expands on
the test coverage for backuptar.

For more information on backup stream format see: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-bkup/f67950c8-d583-469a-83dd-c4ff4cedf533

Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
(cherry picked from commit 33a4801)
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
Signed-off-by: Kyle Wojtaszek <kylewo@microsoft.com>
(cherry picked from commit 4c72048)
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
@kevpar kevpar requested a review from a team as a code owner October 15, 2021 21:52
Copy link
Contributor

@katiewasnothere katiewasnothere left a comment

Choose a reason for hiding this comment

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

LGTM on CI passing

@kevpar kevpar merged commit 7e149e8 into microsoft:release/0.4 Oct 15, 2021
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.

None yet

5 participants