-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add --dry-run-metadata #605
Conversation
a363942
to
1923dba
Compare
tar/multitape/multitape_write.c
Outdated
{ | ||
|
||
/* Create chunkifier. */ | ||
if (!no_chunkifier) { | ||
if (use_chunkifier) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I looked at the code again, I really didn't like the (!no_chunkifier)
part.
I prefer |
1923dba
to
c0e4bec
Compare
Ok, I removed the REBASE commit. As far as I know, this is ready for merging. |
Please fix |
c0e4bec
to
0dd6e10
Compare
The only interesting facets of this commit are: - internally, we store this as bsdtar->option_dryrun == 2; the existing --dry-run option is stored as 1. - we disallow the combination of --dry-run-metadata with --print-stats, because the --print-stats (generated from the chunk layer) would only report metadata and metaindex bytes (since no filesystem data will reach the chunk layer).
If we've been given --dry-run-metadata, then we only care about the total number of bytes in each file, not the contents.
We use the same technique for storage_write.c: if we don't want to use the storage layer (in that case, due to --dry-run), we set the storage cookie to NULL. The next commit will do the same for the chunk layer: if we don't want to use it (due to --dry-run-meta), we'll set the chunkification cookie to NULL. chunkify_free() already does a no-op for NULL.
Disabling chunkification also stops any file or header data from reaching the chunk layer. Metadata and metaindex bytes are unaffected by this change; those are still passed on. This is not a deliberate choice; it's just a bit more awkward to stop those bytes from going to the chunk layer, and since we disabled the combination of --print-stats with --dry-run-metadata in bsdtar.c, it doesn't matter if those bytes are passed on. There's no noticeable performance impact of metadata and metaindex bytes.
These changes were made automatically via scripts.
0dd6e10
to
7ac0a07
Compare
Rebased. Also fixed a comment in |
No description provided.