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

FreeBSD: Add zfs_link_create() error handling #16138

Merged
merged 1 commit into from
May 17, 2024
Merged

Conversation

amotin
Copy link
Member

@amotin amotin commented Apr 26, 2024

Originally Solaris didn't expect errors there, but they may happen if we fail to add entry into ZAP. Linux fixed it in #7421, but it was never fully ported to FreeBSD.

Closes #13215

How Has This Been Tested?

Manually created bunch of files with different latter cases. Observed lost errors without the patch and reported with it.

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)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@amotin
Copy link
Member Author

amotin commented Apr 26, 2024

I'd appreciate a look from somebody familiar with FreeBSD VFS. All I know that it does return proper errors now, does not crash and does not leak inodes.

@amotin amotin force-pushed the create branch 2 times, most recently from cf5c6ae to 62f5538 Compare April 26, 2024 20:47
Originally Solaris didn't expect errors there, but they may happen
if we fail to add entry into ZAP.  Linux fixed it in openzfs#7421, but it
was never fully ported to FreeBSD.

Signed-off-by:	Alexander Motin <[email protected]>
Sponsored-By:	iXsystems, Inc.
Closes openzfs#13215
@amotin amotin added the Status: Code Review Needed Ready for review and testing label Apr 27, 2024
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

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

I'm not familiar with the FreeBSD specifics, but the added error handling looks good.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels May 17, 2024
@behlendorf behlendorf merged commit efbef9e into openzfs:master May 17, 2024
23 of 26 checks passed
amotin added a commit to amotin/zfs that referenced this pull request May 23, 2024
Originally Solaris didn't expect errors there, but they may happen
if we fail to add entry into ZAP.  Linux fixed it in openzfs#7421, but it
was never fully ported to FreeBSD.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Sponsored-By: iXsystems, Inc.
Closes openzfs#13215
Closes openzfs#16138
ixhamza pushed a commit to truenas/zfs that referenced this pull request May 23, 2024
Originally Solaris didn't expect errors there, but they may happen
if we fail to add entry into ZAP.  Linux fixed it in openzfs#7421, but it
was never fully ported to FreeBSD.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Sponsored-By: iXsystems, Inc.
Closes openzfs#13215
Closes openzfs#16138
ixhamza pushed a commit to truenas/zfs that referenced this pull request May 23, 2024
Originally Solaris didn't expect errors there, but they may happen
if we fail to add entry into ZAP.  Linux fixed it in openzfs#7421, but it
was never fully ported to FreeBSD.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Sponsored-By: iXsystems, Inc.
Closes openzfs#13215
Closes openzfs#16138
behlendorf pushed a commit that referenced this pull request May 29, 2024
Originally Solaris didn't expect errors there, but they may happen
if we fail to add entry into ZAP.  Linux fixed it in #7421, but it
was never fully ported to FreeBSD.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Sponsored-By: iXsystems, Inc.
Closes #13215
Closes #16138
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Sep 4, 2024
Originally Solaris didn't expect errors there, but they may happen
if we fail to add entry into ZAP.  Linux fixed it in openzfs#7421, but it
was never fully ported to FreeBSD.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Sponsored-By: iXsystems, Inc.
Closes openzfs#13215
Closes openzfs#16138
@amotin amotin deleted the create branch November 19, 2024 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
2 participants