003 File Manager
Current Path:
/usr/src/sys/contrib/openzfs/tests/zfs-tests/tests/functional/slog
usr
/
src
/
sys
/
contrib
/
openzfs
/
tests
/
zfs-tests
/
tests
/
functional
/
slog
/
📁
..
📄
Makefile.am
(543 B)
📄
cleanup.ksh
(1.42 KB)
📄
setup.ksh
(1.17 KB)
📄
slog.cfg
(1.2 KB)
📄
slog.kshlib
(3.42 KB)
📄
slog_001_pos.ksh
(1.76 KB)
📄
slog_002_pos.ksh
(1.81 KB)
📄
slog_003_pos.ksh
(1.87 KB)
📄
slog_004_pos.ksh
(1.93 KB)
📄
slog_005_pos.ksh
(1.76 KB)
📄
slog_006_pos.ksh
(1.89 KB)
📄
slog_007_pos.ksh
(2.48 KB)
📄
slog_008_neg.ksh
(1.68 KB)
📄
slog_009_neg.ksh
(1.82 KB)
📄
slog_010_neg.ksh
(2.04 KB)
📄
slog_011_neg.ksh
(1.93 KB)
📄
slog_012_neg.ksh
(1.97 KB)
📄
slog_013_pos.ksh
(2.41 KB)
📄
slog_014_pos.ksh
(2.55 KB)
📄
slog_015_neg.ksh
(1.88 KB)
📄
slog_replay_fs_001.ksh
(7 KB)
📄
slog_replay_fs_002.ksh
(3.93 KB)
📄
slog_replay_volume.ksh
(5.22 KB)
Editing: slog_015_neg.ksh
#!/bin/ksh -p # # This file and its contents are supplied under the terms of the # Common Development and Distribution License ("CDDL"), version 1.0. # You may only use this file in accordance with the terms of version # 1.0 of the CDDL. # # A full copy of the text of the CDDL should have accompanied this # source. A copy of the CDDL is also available via the Internet at # http://www.illumos.org/license/CDDL. # # # Copyright (c) 2017 by Delphix. All rights reserved. # . $STF_SUITE/tests/functional/slog/slog.kshlib # # DESCRIPTION: # Concurrent sync writes with log offline/online works. # # STRATEGY: # 1. Configure "zfs_commit_timeout_pct" # 2. Create pool with a log device. # 3. Concurrently do the following: # 3.1. Perform 8K sync writes # 3.2. Perform log offline/online commands # 4. Loop to test with growing "zfs_commit_timeout_pct" values. # verify_runnable "global" function cleanup { # # Wait for any of the writes and/or zpool commands that were # kicked off in the background to complete. On failure, we may # enter this function without previously waiting for them. # wait set_tunable64 COMMIT_TIMEOUT_PCT $ORIG_TIMEOUT poolexists $TESTPOOL && zpool destroy -f $TESTPOOL } typeset ORIG_TIMEOUT=$(get_tunable COMMIT_TIMEOUT_PCT) log_onexit cleanup log_must setup for PCT in 0 1 2 4 8 16 32 64 128 256 512 1024; do log_must set_tunable64 COMMIT_TIMEOUT_PCT $PCT log_must zpool create $TESTPOOL $VDEV log $SDEV for i in {1..10}; do log_must fio --rw write --sync 1 --directory "/$TESTPOOL" \ --bs 8K --size 8K --name slog-test done & for i in {1..10}; do log_must zpool offline $TESTPOOL $SDEV log_must verify_slog_device $TESTPOOL $SDEV 'OFFLINE' log_must zpool online $TESTPOOL $SDEV log_must verify_slog_device $TESTPOOL $SDEV 'ONLINE' done & wait log_must zpool destroy -f $TESTPOOL done log_pass "Concurrent writes with slog offline/online works."
Upload File
Create Folder