-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix range locking in ZIL commit codepath #6477
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
74 changes: 74 additions & 0 deletions
74
tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_zil.ksh
This file contains hidden or 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,74 @@ | ||
| #!/bin/ksh -p | ||
| # | ||
| # CDDL HEADER START | ||
| # | ||
| # The contents of this file are subject to the terms of the | ||
| # Common Development and Distribution License (the "License"). | ||
| # You may not use this file except in compliance with the License. | ||
| # | ||
| # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | ||
| # or http://www.opensolaris.org/os/licensing. | ||
| # See the License for the specific language governing permissions | ||
| # and limitations under the License. | ||
| # | ||
| # When distributing Covered Code, include this CDDL HEADER in each | ||
| # file and include the License file at usr/src/OPENSOLARIS.LICENSE. | ||
| # If applicable, add the following below this CDDL HEADER, with the | ||
| # fields enclosed by brackets "[]" replaced with your own identifying | ||
| # information: Portions Copyright [yyyy] [name of copyright owner] | ||
| # | ||
| # CDDL HEADER END | ||
| # | ||
|
|
||
| # | ||
| # Copyright 2017, loli10K <ezomori.nozomu@gmail.com>. All rights reserved. | ||
| # | ||
|
|
||
| . $STF_SUITE/include/libtest.shlib | ||
| . $STF_SUITE/tests/functional/zvol/zvol_common.shlib | ||
| . $STF_SUITE/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib | ||
|
|
||
| # | ||
| # DESCRIPTION: | ||
| # Verify ZIL functionality on ZVOLs | ||
| # | ||
| # STRATEGY: | ||
| # 1. Create a ZVOLs with various combination of "logbias" and "sync" values | ||
| # 2. Write data to ZVOL device node | ||
| # 3. Verify we don't trigger any issue like the one reported in #6238 | ||
| # | ||
|
|
||
| verify_runnable "global" | ||
|
|
||
| function cleanup | ||
| { | ||
| datasetexists $ZVOL && log_must_busy zfs destroy $ZVOL | ||
| udev_wait | ||
| } | ||
|
|
||
| log_assert "Verify ZIL functionality on ZVOLs" | ||
| log_onexit cleanup | ||
|
|
||
| ZVOL="$TESTPOOL/vol" | ||
| ZDEV="$ZVOL_DEVDIR/$ZVOL" | ||
| typeset -a logbias_prop_vals=('latency' 'throughput') | ||
| typeset -a sync_prop_vals=('standard' 'always' 'disabled') | ||
|
|
||
| for logbias in ${logbias_prop_vals[@]}; do | ||
| for sync in ${sync_prop_vals[@]}; do | ||
| # 1. Create a ZVOL with logbias=throughput and sync=always | ||
| log_must zfs create -V $VOLSIZE -b 128K -o sync=$sync \ | ||
| -o logbias=$logbias $ZVOL | ||
|
|
||
| # 2. Write data to its device node | ||
| for i in {1..50}; do | ||
| dd if=/dev/zero of=$ZDEV bs=8k count=1 & | ||
| done | ||
|
|
||
| # 3. Verify we don't trigger any issue | ||
| log_must wait | ||
| log_must_busy zfs destroy $ZVOL | ||
| done | ||
| done | ||
|
|
||
| log_pass "ZIL functionality works on ZVOLs" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.