Skip to content

Add 'zfs umount -u' for encrypted datasets - #8952

Merged
behlendorf merged 1 commit into
openzfs:masterfrom
datto:unmount_unload
Jun 28, 2019
Merged

behlendorf merged 1 commit into
openzfs:masterfrom
datto:unmount_unload

Conversation

@tcaputi

@tcaputi tcaputi commented Jun 24, 2019

Copy link
Copy Markdown
Contributor

This patch adds the ability for the user to unload keys for
datasets as they are being unmounted. This is analagous to
'zfs mount -l'.

Signed-off-by: Tom Caputi tcaputi@datto.com

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

@kithrup

kithrup commented Jun 24, 2019

Copy link
Copy Markdown
Contributor

If I understood that correctly (haven't tried it, just looked at the code): if it's an encryption root, and it has unmounted it, but cannot unload the key, it will then remount it and fail the operation?

Shouldn't the option be documented in a man page?

@behlendorf
behlendorf requested review from alek-p and behlendorf June 24, 2019 23:06
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Jun 24, 2019

@alek-p alek-p left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@behlendorf behlendorf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

After adding the -u option to the man page as @kithrup mentioned, this looks good to me.

This patch adds the ability for the user to unload keys for
datasets as they are being unmounted. This is analagous to
'zfs mount -l'.

Fixes: openzfs#8917

Signed-off-by: Tom Caputi <tcaputi@datto.com>
@codecov

codecov Bot commented Jun 27, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #8952 into master will increase coverage by 0.14%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8952      +/-   ##
==========================================
+ Coverage   78.54%   78.68%   +0.14%     
==========================================
  Files         388      382       -6     
  Lines      119950   117786    -2164     
==========================================
- Hits        94213    92679    -1534     
+ Misses      25737    25107     -630
Flag Coverage Δ
#kernel 79.23% <ø> (-0.19%) ⬇️
#user 67.29% <88.88%> (+1.2%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 679b0f2...d06fece. Read the comment docs.

@behlendorf
behlendorf merged commit 765d1f0 into openzfs:master Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Code Review Needed Ready for review and testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants