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

ZTS: Fix zvol_misc_volmode test #13075

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

behlendorf
Copy link
Contributor

@behlendorf behlendorf commented Feb 7, 2022

Motivation and Context

False positives primarily observed on Ubuntu 20.04.

https://github.com/openzfs/zfs/actions/runs/1800073353 18 OK / 20 zvol_misc_volmode FAIL
https://github.com/openzfs/zfs/actions/runs/1800273393 18 OK / 20 zvol_misc_volmode FAIL

Description

Changing volmode may need to remove minors, which could be open, so
call udev_wait() before we zfs set volmode=<value>. This ensures
no udev process has the zvol open (i.e. blkid) and the kernel
zvol_remove_minor_impl() function won't skip removing the in use
device.

[updated]

How Has This Been Tested?

Reproduced under Ubuntu 20.04, verified the issue wasn't that we weren't
waiting long enough, but that the device was busy during the removal
and thus skipped.

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:

@behlendorf behlendorf added Component: Test Suite Indicates an issue with the test framework or a test case Status: Code Review Needed Ready for review and testing labels Feb 7, 2022
@behlendorf behlendorf force-pushed the zts-zvol_misc_volmode branch 4 times, most recently from 1e2d1a9 to f06bd81 Compare February 8, 2022 23:01
@behlendorf behlendorf changed the title ZTS: Increase zvol_misc_volmode retry ZTS: Fix zvol_misc_volmode test Feb 8, 2022
@behlendorf behlendorf force-pushed the zts-zvol_misc_volmode branch from f06bd81 to 683e10e Compare February 8, 2022 23:45
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Feb 9, 2022
Changing volmode may need to remove minors, which could be open, so
call udev_wait() before we "zfs set volmode=<value>".  This ensures
no udev process has the zvol open (i.e. blkid) and the kernel
zvol_remove_minor_impl() function won't skip removing the in use
device.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
@behlendorf behlendorf force-pushed the zts-zvol_misc_volmode branch from 683e10e to 0fb8b33 Compare February 9, 2022 19:34
@behlendorf
Copy link
Contributor Author

Force updated to get a second CI run on all the bots. No changes to the patch itself.

@behlendorf behlendorf merged commit 399159f into openzfs:master Feb 10, 2022
@gmelikov gmelikov mentioned this pull request Feb 10, 2022
13 tasks
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 15, 2022
Changing volmode may need to remove minors, which could be open, so
call udev_wait() before we "zfs set volmode=<value>".  This ensures
no udev process has the zvol open (i.e. blkid) and the kernel
zvol_remove_minor_impl() function won't skip removing the in use
device.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#13075
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 16, 2022
Changing volmode may need to remove minors, which could be open, so
call udev_wait() before we "zfs set volmode=<value>".  This ensures
no udev process has the zvol open (i.e. blkid) and the kernel
zvol_remove_minor_impl() function won't skip removing the in use
device.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#13075
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 17, 2022
Changing volmode may need to remove minors, which could be open, so
call udev_wait() before we "zfs set volmode=<value>".  This ensures
no udev process has the zvol open (i.e. blkid) and the kernel
zvol_remove_minor_impl() function won't skip removing the in use
device.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#13075
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
Changing volmode may need to remove minors, which could be open, so
call udev_wait() before we "zfs set volmode=<value>".  This ensures
no udev process has the zvol open (i.e. blkid) and the kernel
zvol_remove_minor_impl() function won't skip removing the in use
device.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#13075
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
Changing volmode may need to remove minors, which could be open, so
call udev_wait() before we "zfs set volmode=<value>".  This ensures
no udev process has the zvol open (i.e. blkid) and the kernel
zvol_remove_minor_impl() function won't skip removing the in use
device.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#13075
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Test Suite Indicates an issue with the test framework or a test case Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants