Home
last modified time | relevance | path

Searched +full:- +full:- +full:trim +full:- +full:- (Results 1 – 25 of 784) sorted by relevance

12345678910>>...32

/freebsd/sys/contrib/openzfs/module/zfs/
H A Dvdev_trim.c9 * or https://opensource.org/licenses/CDDL-1.0.
41 * TRIM is a feature which is used to notify a SSD that some previously
47 * There are two supported TRIM methods; manual and automatic.
49 * Manual TRIM:
51 * A manual TRIM is initiated by running the 'zpool trim' command. A single
53 * managing that vdev TRIM process. This involves iterating over all the
55 * required TRIM I/Os.
60 * the TRIM are regularly written to the pool. This allows the TRIM to be
63 * Automatic TRIM:
65 * An automatic TRIM is enabled by setting the 'autotrim' pool property
[all …]
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_wait/
H A Dzpool_wait_trim_flag.ksh1 #!/bin/ksh -p
22 # -w flag for 'zpool trim' waits for trimming to complete for all and only those
27 # 2. Start trimming vdevs 1 and 2 with one invocation of 'zpool trim -w'
28 # 3. Start trimming vdev 3 with a second invocation of 'zpool trim -w'
29 # 4. Cancel the trim of vdev 1. Check that neither waiting process exits.
30 # 5. Cancel the trim of vdev 3. Check that only the second waiting process
32 # 6. Cancel the trim of vdev 2. Check that the first waiting process exits.
40 [[ -d "$TESTDIR" ]] && log_must rm -r "$TESTDIR"
48 typeset -r VDEV1="$TESTDIR/file_vdev1"
49 typeset -r VDEV2="$TESTDIR/file_vdev2"
[all …]
H A Dzpool_wait_trim_cancel.ksh1 #!/bin/ksh -p
22 # 'zpool wait' works when a trim operation is canceled.
31 # 5. Cancel the trim.
33 # 7. Repeat 3-7, except pause the trim instead of canceling it.
40 [[ -d "$TESTDIR" ]] && log_must rm -r "$TESTDIR"
47 log_must zpool trim -r 1M $TESTPOOL "$FILE_VDEV"
49 log_bkgrnd zpool wait -t trim $TESTPOOL
66 typeset -r FILE_VDEV="$TESTDIR/file_vdev1"
71 log_must truncate -s 10G "$FILE_VDEV"
72 log_must zpool create -f $TESTPOOL "$FILE_VDEV"
[all …]
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_trim/
H A Dzpool_trim_rate.ksh1 #!/bin/ksh -p
27 # Verify 'zpool trim -r <rate>' rate limiting.
31 # 2. Manually TRIM the pool with rate limiting.
32 # 3. Verify the TRIM can be suspended.
33 # 4. Restart the TRIM and verify the rate is preserved.
36 # set be to fairly large since we are capping the maximum trim rate. The
37 # actual trim rate can be lower. The critical thing is that the trim rate
47 if [[ -d "$TESTDIR" ]]; then
48 rm -rf "$TESTDIR"
56 log_must truncate -s 10G "$LARGEFILE"
[all …]
H A Dzpool_trim_partial.ksh1 #!/bin/ksh -p
27 # Verify 'zpool trim' partial trim.
32 # 3. Run 'zpool trim' to only TRIM allocated space maps.
34 # 5. Run 'zpool trim' to perform a full TRIM.
43 if [[ -d "$TESTDIR" ]]; then
44 rm -rf "$TESTDIR"
61 # Minimum trim size is decreased to verify all trim sizes.
66 log_must truncate -s $LARGESIZE "$LARGEFILE"
67 log_must zpool create -O compression=off $TESTPOOL "$LARGEFILE"
71 new_size=$(du -B1 "$LARGEFILE" | cut -f1)
[all …]
H A Dzpool_trim_start_and_cancel_neg.ksh1 #!/bin/ksh -p
27 # Cancelling and suspending trim doesn't work if not all specified vdevs
31 # 1. Create a three-disk pool.
33 # 3. Try to cancel and suspend trimming on the non-trimming disks.
34 # 4. Try to re-trim the currently trimming disk.
38 DISK2="$(echo $DISKS | cut -d' ' -f2)"
39 DISK3="$(echo $DISKS | cut -d' ' -f3)"
41 log_must zpool list -v
42 log_must zpool create -f $TESTPOOL $DISK1 $DISK2 $DISK3 -O recordsize=4k
45 log_must zpool trim -r 1 $TESTPOOL $DISK1
[all …]
H A Dzpool_trim_start_and_cancel_pos.ksh1 #!/bin/ksh -p
27 # Starting and stopping a trim works.
30 # 1. Create a one-disk pool.
37 log_must zpool create -f $TESTPOOL $DISK1
38 log_must zpool trim -r 1 "$TESTPOOL"
40 [[ -z "$(trim_progress $TESTPOOL $DISK1)" ]] && \
41 log_fail "TRIM did not start"
43 log_must zpool trim -c $TESTPOOL
45 [[ -z "$(trim_progress $TESTPOOL $DISK1)" ]] || \
46 log_fail "TRIM did not stop"
[all …]
H A Dzpool_trim_secure.ksh1 #!/bin/ksh -p
27 # Verify 'zpool trim -d' secure trim.
31 # 2. Run 'zpool trim -d' to securely TRIM allocated space maps.
45 if [[ -d "$TESTDIR" ]]; then
46 rm -rf "$TESTDIR"
55 log_must truncate -s $LARGESIZE "$LARGEFILE"
57 log_mustnot zpool trim -d $TESTPOOL
59 log_pass "Manual 'zpool trim -d' failed as expected for file vdevs"
H A Dzpool_trim_neg.ksh1 #!/bin/ksh -p
27 # A badly formed parameter passed to 'zpool trim' should
31 # 1. Create an array containing bad 'zpool trim' parameters.
32 # 2. For each element, execute the sub-command.
37 DISK2="$(echo $DISKS | cut -d' ' -f2)"
41 set -A args "1" "-a" "-?" "--%" "-123456" "0.5" "-o" "-b" "-b no" "-z 2"
43 log_assert "Execute 'zpool trim' using invalid parameters."
45 log_must zpool create -f $TESTPOOL mirror $DISK1 $DISK2
47 typeset -i i=0
48 while [[ $i -lt ${#args[*]} ]]; do
[all …]
H A Dzpool_trim_rate_neg.ksh1 #!/bin/ksh -p
27 # A badly formed parameter passed to 'zpool trim -r' should
31 # 1. Create an array containing bad 'zpool trim -r' parameters.
32 # 2. For each element, execute the sub-command.
37 DISK2="$(echo $DISKS | cut -d' ' -f2)"
41 set -A args "a" "--%" "10X" "yes" "-?" "z 99"
43 log_assert "Execute 'zpool trim -r' using invalid parameters."
45 log_must zpool create -f $TESTPOOL mirror $DISK1 $DISK2
47 typeset -i i=0
48 while [[ $i -lt ${#args[*]} ]]; do
[all …]
H A Dzpool_trim_unsupported_vdevs.ksh1 #!/bin/ksh -p
27 # Attempting to trim unsupported vdevs should fail.
39 # 2. Try to trim vdev1, vdev2, and vdev3. Ensure that all 3 fail.
46 if [[ -d $TESTDIR ]]; then
47 log_must rm -rf $TESTDIR
53 set -A FDISKS
65 log_mustnot zpool trim $TESTPOOL mirror-0
67 log_mustnot zpool trim $TESTPOOL ${FDISKS[$n]}
70 log_pass "Attempting to trim failed on unsupported devices"
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/trim/
H A Dtrim_integrity.ksh1 #!/bin/ksh -p
23 . $STF_SUITE/tests/functional/trim/trim.kshlib
24 . $STF_SUITE/tests/functional/trim/trim.cfg
28 # Verify manual trim pool data integrity.
31 # 1. Create a pool on sparse file vdevs to trim.
33 # 3. Manually trim the pool.
34 # 4. Verify trim IOs of the expected type were issued for the pool.
35 # 5. Verify data integrity of the pool after trim.
40 log_assert "Run 'zpool trim' and verify pool data integrity"
48 log_must rm -f $TRIM_VDEVS
[all …]
H A Dautotrim_trim_integrity.ksh1 #!/bin/ksh -p
23 . $STF_SUITE/tests/functional/trim/trim.kshlib
24 . $STF_SUITE/tests/functional/trim/trim.cfg
28 # Verify automatic trim and manual trim coexist correctly.
31 # 1. Create a pool on sparse file vdevs to trim.
35 # 4. Verify trim IOs of the expected type were issued for the pool.
36 # 5. Verify data integrity of the pool after trim.
41 log_assert "Set 'autotrim=on', run 'zpool trim' and verify pool data integrity"
49 log_must rm -f $TRIM_VDEVS
56 # Minimum trim size is decreased to verify all trim sizes.
[all …]
H A Dtrim_config.ksh1 #!/bin/ksh -p
23 . $STF_SUITE/tests/functional/trim/trim.kshlib
24 . $STF_SUITE/tests/functional/trim/trim.cfg
31 # 1. Create a pool on file vdevs to trim.
34 # 4. Remove all files making it possible to trim the entire pool.
35 # 5. Manually trim the pool.
36 # 6. Wait for trim to issue trim IOs for the free blocks.
42 log_assert "Run 'zpool trim' verify pool disks were trimmed"
50 log_must rm -f $TRIM_VDEVS
58 # Minimum trim size is decreased to verify all trim sizes.
[all …]
H A Dautotrim_integrity.ksh1 #!/bin/ksh -p
23 . $STF_SUITE/tests/functional/trim/trim.kshlib
24 . $STF_SUITE/tests/functional/trim/trim.cfg
28 # Verify automatic trim pool data integrity.
31 # 1. Create a pool on sparse file vdevs to trim.
34 # 4. Verify trim IOs of the expected type were issued for the pool.
35 # 5. Verify data integrity of the pool after trim.
48 log_must rm -f $TRIM_VDEVS
55 # Minimum trim size is decreased to verify all trim sizes.
64 log_must truncate -s 1G $TRIM_VDEVS
[all …]
H A Dautotrim_config.ksh1 #!/bin/ksh -p
23 . $STF_SUITE/tests/functional/trim/trim.kshlib
24 . $STF_SUITE/tests/functional/trim/trim.cfg
31 # 1. Create a pool on file vdevs to trim.
35 # 5. Remove all files making it possible to trim the entire pool.
36 # 6. Wait for auto trim to issue trim IOs for the free blocks.
50 log_must rm -f $TRIM_VDEVS
58 # Minimum trim size is decreased to verify all trim sizes.
84 # The per-vdev utilization is lower due to the capacity
89 log_must truncate -s $((4 * MINVDEVSIZE)) $VDEVS
[all …]
H A Dtrim.kshlib1 #!/bin/ksh -p
25 du --block-size 1048576 -s "$1" | cut -f1
29 # Get the number of trim IOs issued for the pool (ind or agg).
33 typeset pool="${1-:$TESTPOOL}"
34 typeset type="${2-:ind}"
38 # Sum the ind or agg columns of the trim request size histogram.
41 zpool iostat -pr $pool $vdev |
42 awk '$1 ~ /[0-9].*/ { sum += $12 } END { print sum }'
45 zpool iostat -pr $pool $vdev |
46 awk '$1 ~ /[0-9].*/ { sum += $13 } END { print sum }'
[all …]
H A Dtrim_l2arc.ksh1 #!/bin/ksh -p
18 . $STF_SUITE/tests/functional/trim/trim.kshlib
19 . $STF_SUITE/tests/functional/trim/trim.cfg
27 # 2. Create a pool on file vdevs to trim.
32 # 6. Verify trim IOs of the expected type were issued for the pool.
39 command -v fio > /dev/null || log_unsupported "fio missing"
41 log_assert "Trim of L2ARC succeeds."
49 log_must rm -f $VDEVS
56 # dev->l2ad_hand loops around and dev->l2ad_first=0. Otherwise
63 log_must truncate -s $((MINVDEVSIZE)) $TRIM_VDEV2
[all …]
/freebsd/sys/contrib/openzfs/man/man8/
H A Dzpool-trim.89 .\" or https://opensource.org/licenses/CDDL-1.0.
27 .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
34 .Nm zpool-trim
35 .Nd initiate TRIM of free space in ZFS storage pool
38 .Cm trim
46 Initiates an immediate on-demand TRIM operation for all of the free space in
52 A manual on-demand TRIM operation can be initiated irrespective of the
58 .Bl -tag -width Ds
59 .It Fl d , -secure
60 Causes a secure TRIM to be initiated.
[all …]
/freebsd/sys/contrib/device-tree/Bindings/nvmem/
H A Dsocionext,uniphier-efuse.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/nvmem/socionext,uniphier-efus
[all...]
/freebsd/tools/test/stress2/misc/
H A Dtrim8.sh4 # SPDX-License-Identifier: BSD-2-Clause
30 # Demonstrate disk queue completely full of TRIM commands.
34 [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
35 trim=$(df -k | sed 1d | sort -rn +3 | awk '{print $NF}' | while read mp; do
36 mount | grep "on $mp " | grep -q ufs || continue
38 dumpfs $on | head -20 | grep -q trim || continue
41 [ -z "$trim" ] && exit 0
42 mp=`mount | grep "$trim " | awk '{print $3}'`
43 echo "Found TRIM on $trim mounted as $mp"
44 free=`df -k $mp | tail -1 | awk '{print $4}'`
[all …]
H A Dtrim2.sh29 [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
31 # Run a test on a 128 MB malloc backed MD with UFS SU fs with option trim.
36 mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint
37 mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart
38 mdconfig -a -t malloc -o reserve -s 128m -u $mdstart || exit 1
39 [ $# -eq 0 ] && trim=-t
40 newfs $trim $newfs_flags md$mdstart > /dev/null
43 echo "This is a Trim (TRIM) test." >> $mntpoint/file
50 while mount | grep $mntpoint | grep -q /dev/md; do
54 grep -a -qm1 Trim /dev/md$mdstart && { echo "Test failed"; s=1; }
[all …]
/freebsd/contrib/atf/atf-c++/detail/
H A Dtext_test.cpp26 #include "atf-c++/detail/text.hpp"
32 #include <atf-c++.hpp>
34 // ------------------------------------------------------------------------
36 // ------------------------------------------------------------------------
67 // First set of tests using a non-sorted collection, std::vector. in ATF_TEST_CASE_BODY()
147 ATF_REQUIRE(match("", "[a-z]*")); in ATF_TEST_CASE_BODY()
150 ATF_REQUIRE(match("hello", "[a-z]+")); in ATF_TEST_CASE_BODY()
151 ATF_REQUIRE(match("hello", "^[a-z]+$")); in ATF_TEST_CASE_BODY()
154 ATF_REQUIRE(!match("hello", "[a-z]+5")); in ATF_TEST_CASE_BODY()
155 ATF_REQUIRE(!match("hello", "^ [a-z]+$")); in ATF_TEST_CASE_BODY()
[all …]
/freebsd/sys/contrib/openzfs/etc/systemd/system/
H A Dzfs-trim@.service.in2 Description=zpool trim on %i
3 Documentation=man:zpool-trim(8)
10 EnvironmentFile=-@initconfdir@/zfs
11 ExecStart=/bin/sh -c '\
12 if @sbindir@/zpool status %i | grep -q "(trimming)"; then\
13 exec @sbindir@/zpool wait -t trim %i;\
14 else exec @sbindir@/zpool trim -w %i; fi'
15 ExecStop=-/bin/sh -c '@sbindir@/zpool trim -s %i 2>/dev/null || true'
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zvol/zvol_misc/
H A Dzvol_misc_trim.ksh1 #!/bin/ksh -p
10 # or https://opensource.org/licenses/CDDL-1.0.
33 # Verify we can TRIM a zvol
36 # 1. TRIM the entire zvol to remove data from older tests
40 # 5. TRIM the first 1MB and last 2MB of the 5MB block of data.
47 # We need '--force' here since the prior tests may leave a filesystem
51 # Only blkdiscard >= v2.36 supports --force, so we need to
53 if blkdiscard --help | grep -q '\-\-force' ; then
54 trimcmd='blkdiscard --force'
59 # By default, FreeBSD 'trim' always does a dry-run. '-f' makes
[all …]

12345678910>>...32