-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix EIO after resuming receive of new dataset over an existing one #10999
Conversation
The test failures don't look related to this PR. |
@asomers I've resubmitted those unrelated test failures. However, it does look like there were a couple related failures to look in to.
|
@behlendorf how does one run those tests on FreeBSD? The README does not say. |
@asomers the process is the same on Linux and FreeBSD, though again the documentation really needs to be updated to explain this. With the kernel modules loaded and the OpenZFS source tree built you can run the ZFS Test Suite in-tree with the # Load the newly built kernel modules from the source tree.
./scripts/zfs.sh
# Run just the rsend and redacted_send test groups.
./scripts/zfs-tests.sh -T rsend,redacted_send You can also use the
I'm sure @freqlabs has some tips about running the tests on FreeBSD as well! |
Running the tests in-tree fails with the following error. Are there some extra environment variables I need to set, or extra make targets I need to build?
|
That should be enough. The "Missing util(s)" warning shouldn't be fatal, it's largely complaining about some Linux specific utilities and tests which haven't been build (as intended). |
The list of FreeBSD packages for test dependencies here should be up to date. |
Ok, let's try again |
Test failure summary:
|
@asomers you're right those test failures are all known unrelated issue. When you refresh this to address the style issue would you mind rebasing it on master, that'll resolve the Fedora build failure. |
When resuming an interrupted ZFS send stream that creates a new dataset with the same name as an existing dataset, if the existing dataset is accessed after the failed receive, then after the subsequent successful receive it will return EIO. This happens because nothing mounts the new dataset, leaving the old, no longer valid dataset still mounted. This commit fixes zfs receive to always unmount and remount the destination, regardless of whether the stream is a new stream or a resumed stream. Fixes openzfs#10995 Sponsored by: Axcient Downtream bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249579 Signed-off-by: Alan Somers <[email protected]>
f5e9ede
to
4673ab2
Compare
Rebased and squashed. |
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.
Makes sense. It'd be nice to have a test for this, but I don't think it's critical.
When resuming an interrupted ZFS send stream that creates a new dataset with the same name as an existing dataset, if the existing dataset is accessed after the failed receive, then after the subsequent successful receive it will return EIO. This happens because nothing mounts the new dataset, leaving the old, no longer valid dataset still mounted. This commit fixes zfs receive to always unmount and remount the destination, regardless of whether the stream is a new stream or a resumed stream. Sponsored by: Axcient Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Alan Somers <[email protected]> External-issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249579 Closes #10995 Closes #10999
When resuming an interrupted ZFS send stream that creates a new dataset with the same name as an existing dataset, if the existing dataset is accessed after the failed receive, then after the subsequent successful receive it will return EIO. This happens because nothing mounts the new dataset, leaving the old, no longer valid dataset still mounted. This commit fixes zfs receive to always unmount and remount the destination, regardless of whether the stream is a new stream or a resumed stream. Sponsored by: Axcient Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Alan Somers <[email protected]> External-issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249579 Closes openzfs#10995 Closes openzfs#10999
When resuming an interrupted ZFS send stream that creates a new dataset with the same name as an existing dataset, if the existing dataset is accessed after the failed receive, then after the subsequent successful receive it will return EIO. This happens because nothing mounts the new dataset, leaving the old, no longer valid dataset still mounted. This commit fixes zfs receive to always unmount and remount the destination, regardless of whether the stream is a new stream or a resumed stream. Sponsored by: Axcient Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Alan Somers <[email protected]> External-issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249579 Closes openzfs#10995 Closes openzfs#10999
Fixes #10995
Sponsored by: Axcient
Downtream bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249579
Signed-off-by: Alan Somers [email protected]
Motivation and Context
When resuming an interrupted ZFS send stream that creates a new dataset
with the same name as an existing dataset, if the existing dataset is
accessed after the failed receive, then after the subsequent successful
receive it will return EIO. This happens because nothing mounts the new
dataset, leaving the old, no longer valid dataset still mounted.
#10995
Description
This commit fixes zfs receive to always unmount and remount the
destination, regardless of whether the stream is a new stream or a
resumed stream.
How Has This Been Tested?
See steps to reproduce in the issue. Tested on FreeBSD 13-CURRENT and FreeBSD 12.2-BETA3 (the latter with an older branch of ZFS). No regressions observed on 12.0-CURRENT with the FreeBSD ZFS test suite.
Types of changes
Checklist:
Signed-off-by
.