-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not crash
zfs.dataset.unlocked_zvols_fast
when volmode=full
is…
… set (#13742)
- Loading branch information
1 parent
8826a3a
commit e717ef7
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from middlewared.test.integration.assets.pool import dataset | ||
from middlewared.test.integration.utils import call, ssh | ||
|
||
|
||
def test__unlocked_zvols_fast__volmode(): | ||
with dataset("container") as container: | ||
ssh(f"zfs set volmode=full {container}") | ||
|
||
with dataset("container/zvol", {"type": "VOLUME", "volsize": 100 * 1024 * 1024}) as zvol: | ||
ssh(f"sgdisk -n 1:1MiB:2MiB /dev/zvol/{zvol}") | ||
|
||
call("zfs.dataset.unlocked_zvols_fast", [["name", "=", zvol]], {}, ["SIZE", "RO", "DEVID", "ATTACHMENT"]) |