Lines Matching +full:conv +full:- +full:period

29 ZFS=${ZFS:-/sbin/zfs}
30 ZPOOL=${ZPOOL:-/sbin/zpool}
31 os_name=`uname -s`
39 until [[ $# -eq 0 ]];do
49 if [[ unsupported -gt 0 ]] ; then
59 # $2 filesystem type; optional - defaulted to zfs
66 [[ -z $fstype ]] && fstype=zfs
96 # $2 filesystem type; optional - defaulted to zfs
108 # $2 filesystem type; optional - defaulted to zfs
119 # $1 - line to split
146 [[ -d /$TESTPOOL ]] && $RM -rf /$TESTPOOL
147 log_must $ZPOOL create -f $TESTPOOL $disklist
152 $RM -rf $TESTDIR || log_unresolved Could not remove $TESTDIR
153 $MKDIR -p $TESTDIR || log_unresolved Could not create $TESTDIR
158 if [[ -n $container ]]; then
159 $RM -rf $TESTDIR1 || \
161 $MKDIR -p $TESTDIR1 || \
171 if [[ -n $volume ]]; then
173 log_must $ZFS create -V $VOLSIZE $TESTPOOL/$TESTVOL
223 typeset fs_vol=${1:-$TESTFS}
224 typeset snap=${2:-$TESTSNAP}
226 [[ -z $fs_vol ]] && log_fail "Filesystem or volume's name is undefined."
227 [[ -z $snap ]] && log_fail "Snapshot's name is undefined."
246 typeset snap=${1:-$TESTPOOL/$TESTFS@$TESTSNAP}
247 typeset clone=${2:-$TESTPOOL/$TESTCLONE}
249 [[ -z $snap ]] && \
251 [[ -z $clone ]] && \
275 [[ -z $primary ]] && \
277 [[ -z $secondary ]] && \
279 [[ -d /$TESTPOOL ]] && $RM -rf /$TESTPOOL
280 log_must $ZPOOL create -f $TESTPOOL mirror $@
294 typeset -i nmirrors=$1
298 log_must test -n "$1" -a -n "$2"
299 [[ -d /$TESTPOOL$nmirrors ]] && $RM -rf /$TESTPOOL$nmirrors
300 log_must $ZPOOL create -f $TESTPOOL$nmirrors mirror $1 $2
302 (( nmirrors = nmirrors - 1 ))
315 typeset -i nraidzs=$1
319 log_must test -n "$1" -a -n "$2"
320 [[ -d /$TESTPOOL$nraidzs ]] && $RM -rf /$TESTPOOL$nraidzs
321 log_must $ZPOOL create -f $TESTPOOL$nraidzs raidz $1 $2
323 (( nraidzs = nraidzs - 1 ))
339 # Given a minimum of two disks, set up a storage pool and dataset for the raid-z
345 set -A disks $disklist
347 if [[ ${#disks[*]} -lt 2 ]]; then
348 log_fail "A raid-z requires a minimum of two disks."
351 [[ -d /$TESTPOOL ]] && $RM -rf /$TESTPOOL
352 log_must $ZPOOL create -f $TESTPOOL raidz $1 $2 $3
364 # sub-tests to ensure errors from one set of tests doesn't
376 cmd="$ZPOOL list -H -o name | $GREP 'testpool'"
386 typeset pool_count=`$ZPOOL list -H | $GREP -v '^testpool' | $WC -l`
387 [ "$pool_count" -ne 0 ]
409 for fs in $($ZFS list -H -o name \
412 log_must $ZFS destroy -Rf $fs
416 for fs in $($ZFS list -H -o name \
419 [[ -d $fs ]] && log_must $RM -rf $fs/*
426 for fs in $($ZFS list -H -o name \
434 if [[ $? -ne 0 ]] || [[ -z "$enc" ]] || \
451 [[ -d $TESTDIR ]] && \
452 log_must $RM -rf $TESTDIR
467 [[ $? -eq 0 ]] && \
471 log_must $ZFS destroy -R $TESTPOOL/$TESTCTR/$TESTFS1
474 log_must $ZFS destroy -Rf $TESTPOOL/$TESTCTR
476 [[ -e $TESTDIR1 ]] && \
477 log_must $RM -rf $TESTDIR1 > /dev/null 2>&1
490 typeset snap=${1:-$TESTPOOL/$TESTFS@$TESTSNAP}
509 [[ $mtpt != "" && -d $mtpt ]] && \
510 log_must $RM -rf $mtpt
520 typeset clone=${1:-$TESTPOOL/$TESTCLONE}
535 [[ $mtpt != "" && -d $mtpt ]] && \
536 log_must $RM -rf $mtpt
541 # $1 - snapshot name
545 $ZFS list -H -t snapshot "$1" > /dev/null 2>&1
558 # non-zero otherwise.
598 [[ -z $dataset ]] && return 1
601 typeset -i found=0
608 [[ $found -eq 0 ]] && return 2
609 if [[ -n $COMPRESSION_PROP ]]; then
614 if [[ -n $CHECKSUM_PROP && $WRAPPER != *"crypto"* ]]; then
635 while [[ -n $* ]]; do
637 [ ! -e $diskname ] && log_fail "ERROR: $diskname doesn't exist"
639 wait_for 5 1 $GPART destroy -F $diskname
643 log_must $GPART create -s gpt $diskname
656 typeset -i slicenum=$1
660 set -A devmap a b c d e f g h
661 [[ -z $slicenum || -z $size || -z $disk ]] && \
668 [[ -n $start ]] && start="-b $start"
669 log_must $GPART add -t efi $start -s $size -i $slicenum $disk
689 # #TODO: fix this to be GPT-compatible if we want to use the SMI WRAPPER. This
716 typeset -i i=1
732 sz=`stat -f '%z' $fname`
733 [[ -z "$sz" ]] && log_fail "stat($fname) failed"
751 # dirnum: the maximum number of subdirectories to use, -1 no limit
764 typeset destdir=${1:-$TESTDIR}
765 typeset -i dirnum=${2:-50}
766 typeset -i filenum=${3:-50}
767 typeset -i blocksz=${4:-8192}
768 typeset -i num_writes=${5:-10240}
769 typeset -i data=${6:-0}
771 typeset -i retval=0
772 typeset -i dn=0 # current dir number
773 typeset -i fn=0 # current file number
777 log_must $MKDIR -p $curdir
779 log_cmd $FILE_WRITE -o create -f $curdir/$TESTFILE.$fn \
780 -b $blocksz -c $num_writes -d $data
792 # Note property is in 'parsable' format (-p)
800 prop_val=$($ZFS get -pH -o value $prop $dataset 2>/dev/null)
801 if [[ $? -ne 0 ]]; then
837 prop_val=$($ZPOOL get $prop $pool 2>/dev/null | $TAIL -1 | \
839 if [[ $? -ne 0 ]]; then
855 # $1 - pool name
861 if [[ -z $pool ]]; then
866 $ZPOOL list -H "$pool" > /dev/null 2>&1
872 # $1-n dataset name
881 $ZFS list -H -t filesystem,snapshot,volume $1 > /dev/null 2>&1 || \
891 # $1-n dataset name
900 $ZFS list -H -t filesystem,snapshot,volume $1 > /dev/null 2>&1 && \
924 none|legacy|-) return 1
938 typeset stat=$($SVCS -H -o STA nfs/server:default)
983 # Cannot share directory in non-global zone.
991 if [[ $($SVCS -Ho STA $nfs_fmri) != "ON" ]]; then
998 if [[ -d $dummy ]]; then
999 log_must $RM -rf $dummy
1014 while [[ timeout -ne 0 && $($SVCS -Ho STA $nfs_fmri) == *'*' ]]
1018 (( timeout -= 1 ))
1022 log_must $RM -rf $dummy
1025 log_note "Current NFS status: '$($SVCS -Ho STA,FMRI $nfs_fmri)'"
1031 # Return 0 if in global zone, 1 in non-global zone
1060 [[ -z $limit ]] && return 0
1071 *) log_note "Warning: unknown limit $limit - use both."
1083 *) log_note "Warning: unknown limit $limit - use both."
1096 # $1 - pool name
1097 # $2-n - [keyword] devs_list
1105 if [[ -z $pool ]]; then
1115 [[ -d /$pool ]] && $RM -rf /$pool
1116 log_must $ZPOOL create -f $pool $@
1125 # $1 - pool name
1133 if [[ -z $pool ]]; then
1141 log_must $ZPOOL destroy -f $pool
1143 [[ -d $mtpt ]] && \
1144 log_must $RM -rf $mtpt
1162 [ -n "$VDEV_SIZE" ] && vdsize=$VDEV_SIZE
1163 rm -f $@ || return 1
1164 truncate -s $vdsize $@
1178 typeset zone_name=${1:-$(hostname)-z}
1179 typeset zone_root=${2:-"/zone_root"}
1180 typeset zone_ip=${3:-"10.1.1.10"}
1183 typeset -i cntctr=5
1184 typeset -i i=0
1188 [[ -d /$pool_name ]] && $RM -rf /$pool_name
1189 log_must $ZPOOL create -f $pool_name $DISKS
1196 log_must $ZFS create -V 1g $pool_name/zone_zvol
1211 [[ -d $zone_root ]] && \
1212 log_must $RM -rf $zone_root/$zone_name
1213 [[ ! -d $zone_root ]] && \
1214 log_must $MKDIR -p -m 0700 $zone_root/$zone_name
1250 log_must $ZONECFG -z $zone_name -f $zone_conf
1251 log_must $RM -f $zone_conf
1254 $ZONEADM -z $zone_name install
1256 log_note "SUCCESS: $ZONEADM -z $zone_name install"
1258 log_fail "FAIL: $ZONEADM -z $zone_name install"
1275 log_must $ZONEADM -z $zone_name boot
1279 # Reexport TESTPOOL & TESTPOOL(1-4)
1283 typeset -i cntctr=5
1284 typeset -i i=0
1310 typeset -i start=$(date '+%s')
1311 typeset -i endtime
1317 [ $? -eq 0 ] && return
1319 [ $curtime -gt $endtime ] && return 1
1352 $ZPOOL status -v $pool | grep "$disk" \
1353 | egrep -i "$stateexpr" > /dev/null 2>&1
1377 typeset -i timeout=$1
1383 for ((; $timeout > 0; timeout=$timeout-1)); do
1385 [ $? -eq 0 ] && return
1398 typeset dataset=${1:-$TESTPOOL/$TESTFS@$TESTSNAP}
1407 if [[ -z $fs || -z $snap ]]; then
1418 if ! $ZDB -bcv $pool; then
1428 if ! $ZDB -ivv $filesys | $GREP "ZIL header"; then
1453 if [[ -n $dirs ]] ; then
1455 search_path="$search_path -d $dir"
1461 $ZDB -cudi $filesys > $zdbout 2>&1
1463 log_note "Output: $ZDB -cudi $filesys"
1468 log_must $RM -rf $zdbout
1478 disklist=$($ZPOOL iostat -v $1 | $NAWK '(NR >4 ) {print $1}' | \
1479 $GREP -v "\-\-\-\-\-" | \
1480 $EGREP -v -e "^(mirror|raidz1|raidz2|spare|log|cache)$" )
1492 for metad in $($METASTAT -p | $AWK '{print $1}'); do
1493 log_must $METACLEAR -rf $metad
1496 for metad in $($METADB | $CUT -f6 | $GREP dev | $UNIQ); do
1497 log_must $METADB -fd $metad
1502 # This function kills a given list of processes after a time period. We use
1513 typeset -i TIMEOUT=$1
1524 $PS -p $pid > /dev/null 2>&1
1526 log_must $KILL -USR1 $pid
1542 typeset cur_ver=`$UNAME -r`
1607 $ECHO $disk | $EGREP "^c[0-F]+([td][0-F]+)+$" > /dev/null 2>&1
1622 # Check the output of 'zpool status -v <pool>',
1633 $ZPOOL status -v "$pool" 2>/dev/null | \
1634 $NAWK -v token="$token:" '($1==token) {print $0}' | \
1635 $GREP -i "$keyword" >/dev/null 2>&1
1643 if [ -z "$2" ]; then
1644 test $errs -gt 0; ret=$?
1646 test $errs -eq $2; ret=$?
1662 $ZPOOL status -x $pool > ${tmpfile}
1678 typeset -i fetchbegin=1
1679 typeset -i errnum=0
1680 typeset -i c_read=0
1681 typeset -i c_write=0
1682 typeset -i c_cksum=0
1684 cat ${file} | $EGREP -v "pool:" | while read line; do
1691 if [[ -n $checkvdev ]]; then
1715 rm -f $file
1721 # If the number is unspecified, any non-zero number returns true.
1731 typeset -i errs=$(pool_errors_from_file $tmpfile $vdev)
1737 # If the number is unspecified, any non-zero number returns true.
1746 typeset -i errs=$(pool_errors_from_file $tmpfile)
1770 typeset real_output=$($ZPOOL status -x $pool)
1775 typeset -i ret
1776 $ZPOOL status -x $pool | $GREP "state:" | \
1782 l_scan=$($ZPOOL status -x $pool | $GREP "scan:")
1795 # is_pool_resilvering - to check if the pool is resilver in progress
1796 # is_pool_resilvered - to check if the pool is resilver completed
1797 # is_pool_scrubbing - to check if the pool is scrub in progress
1798 # is_pool_scrubbed - to check if the pool is scrub completed
1799 # is_pool_scrub_stopped - to check if the pool is scrub stopped
1851 $ZPOOL labelclear -f $device
1854 if geom disk list | grep -qx "Geom name: ${device#/dev/}"; then
1872 typeset rsh_cmd="$RSH -n"
1889 rsh_cmd="$rsh_cmd -l $username"
1919 typeset -i count=0
1935 # $1 usrname passing down to -l option of /usr/bin/rsh
1944 typeset -i ret=0
1953 rsh_str="$RSH -n"
1955 rsh_str="$RSH -n -l $ruser"
1958 $rsh_str $rhost /usr/local/bin/ksh93 -c "'$cmd_str; \
1959 print -u 2 \"status=\$?\"'" \
1964 $RM -f $std_file $err_file
1968 ret=$($GREP -v 'print -u 2' $err_file | $GREP 'status=' | \
1969 $CUT -d= -f2)
1972 $RM -f $err_file >/dev/null 2>&1
1977 # Get the SUNWstc-fs-zfs package installation path in a remote host
1985 pkgpath=$($RSH -n $rhost "$PKGINFO -l SUNWstc-fs-zfs | $GREP BASEDIR: |\
1986 $CUT -d: -f2")
2005 [[ $first == 1 ]] && echo -n " "
2008 /dev/*) echo -n "$disk" ;;
2009 *) echo -n "/dev/$disk" ;;
2017 set -A disk_array $(find_disks $DISKS)
2018 [[ -z "$DISK_ARRAY_LIMIT" ]] && typeset -i DISK_ARRAY_LIMIT=5
2021 typeset -i i=0
2051 typeset -i uid=1000
2053 typeset -i ret
2054 $USERADD -u $uid -g $gname -d /var/tmp/$uname -m $uname
2108 typeset -i gid=100
2110 $GROUPADD -g $gid $group > /dev/null 2>&1
2111 typeset -i ret=$?
2136 $GROUPDEL -n $grp > /dev/null 2>&1
2137 typeset -i ret=$?
2164 for pool in $($ZPOOL list -H -o name)
2168 # this is a list of the top-level directories in each of the files
2170 FILEPOOL=$($ZPOOL status -v $pool | $GREP /$1/ | \
2174 ZVOLPOOL=$($ZPOOL status -v $pool | $GREP "/dev/zvol/$1$" | \
2177 # also want to determine if it's a file-based pool using an
2179 POOL_FILE_DIRS=$($ZPOOL status -v $pool | \
2181 $AWK -F/ '{print $2}' | $GREP -v "dev")
2185 OUTPUT=$($ZFS list -H -r -o mountpoint $1 | \
2192 if [ ! -z "$ZVOLPOOL" ]
2198 if [ ! -z "$FILEPOOL" ]
2204 if [ ! -z "$ALTMOUNTPOOL" ]
2211 if [ -z "${DONT_DESTROY}" ]
2227 ip=`$ARP $1 2>/dev/null | $AWK -F\) '{print $1}' \
2228 | $AWK -F\( '{print $2}'`
2241 if [[ "ON" != $($SVCS -H -o sta $ISCSII_FMRI) ]]; then
2244 typeset -i retry=20
2245 while [[ "ON" != $($SVCS -H -o sta $ISCSII_FMRI) && \
2246 ( $retry -ne 0 ) ]]
2248 (( retry = retry - 1 ))
2252 if [[ "ON" != $($SVCS -H -o sta $ISCSII_FMRI) ]]; then
2257 log_must $ISCSIADM add discovery-address $(getipbyhost $1)
2258 log_must $ISCSIADM modify discovery --sendtargets enable
2259 log_must $DEVFSADM -i iscsi
2286 [[ -z $dataset ]] && return 1
2289 [[ -z $targets ]] && return 1
2307 [[ -z $target ]] && log_fail "No parameter."
2325 log_must $RM -f $ISCSITGTFILE
2326 if [[ "ON" == $($SVCS -H -o sta $ISCSITGT_FMRI) ]]; then
2331 log_must $SVCADM enable -t $ISCSITGT_FMRI
2333 typeset -i retry=20
2334 while [[ "ON" != $($SVCS -H -o sta $ISCSITGT_FMRI) && \
2335 ( $retry -ne 0 ) ]]
2338 (( retry = retry - 1 ))
2341 if [[ "ON" != $($SVCS -H -o sta $ISCSITGT_FMRI) ]]; then
2354 if [[ -e $ISCSITGTFILE ]]; then
2356 log_must $RM -f $ISCSITGTFILE
2366 log_must $ISCSIADM modify discovery --sendtargets disable
2367 log_must $ISCSIADM remove discovery-address $(getipbyhost $1)
2368 $DEVFSADM -Cv
2378 typeset GZIP_OPTS="gzip gzip-1 gzip-2 gzip-3 gzip-4 gzip-5 \
2379 gzip-6 gzip-7 gzip-8 gzip-9"
2388 if [[ $? -eq 0 ]]; then
2402 if [[ -z $command ]]; then
2404 elif [[ -z $option ]]; then
2407 eval "$ZFS $command 2>&1 | $GREP -- '$option' | \
2408 $GREP -v -- 'User-defined' > /dev/null 2>&1"
2421 if [[ -z $command ]]; then
2423 elif [[ -z $option ]]; then
2426 eval "$ZPOOL $command 2>&1 | $GREP -- '$option' > /dev/null 2>&1"
2432 # Verify zfs operation with -p option work as expected
2455 ops="create -V $VOLSIZE"
2459 if [[ -z $newdataset ]]; then
2467 if [[ -z $newdataset ]]; then
2481 log_must $ZFS destroy -rRf ${newdataset%/*}
2484 # without -p option, operation will fail
2488 # with -p option, operation should succeed
2489 log_must $ZFS $ops -p $dataset $newdataset
2491 log_fail "-p option does not work for $ops"
2496 log_must $ZFS $ops -p $dataset $newdataset
2507 guid=$($ZDB -l ${diskname} | ${AWK} '/^ guid:/ {print $2}' | head -1)
2526 "-")
2529 if [[ -f "${dir}/zpool.cache" ]]; then
2538 [[ $ret -eq 0 || $ret -eq 1 ]] && print "$cachefile"
2550 [ $? -ne 0 ] && log_fail "ERROR: Cachefile not created for '$pool'?"
2551 log_must test -e "${cachefile}"
2552 log_must zdb -U ${cachefile} -C ${pool}
2566 typeset -i ret=$?
2568 0) opts="-C" ;;
2569 1) opts="-U $cachefile -C" ;;
2570 2) opts="-eC" ;;
2574 opts="-eC"
2575 [[ -n "$vdevdir" ]] && opts="$opts -p $vdevdir"
2594 value=$($ZDB $zdb_opts $pool | $GREP "$config:" | $AWK -F: '{print $2}')
2595 if [[ -n $value ]] ; then
2610 # $2-n string
2618 typeset -i ind
2621 typeset ret=$($ECHO "$str" | $CUT -f $ind -d ' ')
2630 typeset -i cnt=$#
2651 typeset -i len=$1
2653 typeset -i baselen=${#basestr}
2654 typeset -i iter=0
2665 (( iter -= 1 ))
2684 log_must $ZPOOL import -d $path $TESTPOOL
2701 cksum=$($ZDB -vvv $1 | $GREP "^Dataset $1 \[" | $GREP "cksum" \
2702 | $AWK -F= '{print $6}')
2726 typeset field=${3:-$pool}
2728 state=$($ZPOOL status -v "$pool" 2>/dev/null | \
2729 $NAWK -v device=$disk -v pool=$pool -v field=$field \
2734 (startfield==1)&&(NF>=3)&&($(NF-1)=="was")&&($NF==device) {print $2; exit;}
2749 if [[ -z $dir ]]; then
2753 $DF -T $dir | $AWK '{print $2}'
2763 if [[ -z $disk ]]; then
2767 typeset arch=$($UNAME -p)
2776 $FDISK -B $disk >/dev/null 2>&1
2790 $FORMAT -e -s -d $disk -f $label_file
2791 typeset -i ret_val=$?
2792 $RM -f $label_file
2814 if [[ -z $prop ]]; then
2861 $GREP -w "$prop" > /dev/null 2>&1
2875 if [[ -z $prop ]]; then
2918 $GREP -w "$prop" > /dev/null 2>&1
2929 $DF -T / | $GREP -q zfs
2940 if [[ -z "$rootfs" ]]; then
2961 rootpool=`$ECHO $rootfs | awk -F\/ '{print $1}'`
2977 $NAWK -v pos=$2 -v offset=$3 '{print substr($0, pos, offset)}'
2995 typeset dirpath=${1:-$STC_NAME}
2997 print "SUNWstc-${dirpath}" | /usr/bin/sed -e "s/\//-/g"
3005 $ECHO $1 | $WC -w
3013 typeset -i min=${2:-1}
3015 typeset -i count=$(get_word_count "$1")
3029 if [ "`sysctl -n vfs.zfs.vol.recursive`" -ne 1 ]; then
3040 echo $arg | egrep "*s[0-9]$" > /dev/null 2>&1
3041 if [ $? -eq 0 ]
3043 n=`echo $arg| wc -c`
3044 set -A map a b c d e f g h i j
3045 s=`echo $arg | cut -c $((n-1))`
3046 arg=${arg%s[0-9]}${map[$s]}
3065 $XARGS -n 1 $ZFS list -H -o name -t all -r | \
3066 $XARGS -n 1 $ZFS unmount
3074 # We assume output from zpool upgrade -v of the form:
3079 typeset ZPOOL_VERSION=$($ZPOOL upgrade -v | $HEAD -1 | \
3080 $AWK '{print $NF}' | $SED -e 's/\.//g')
3107 $RM -f $TMPDIR/.zfsd_enabled_during_stf_zfs_tests
3108 if [[ -n "$ZFSD" && -x "$ZFSD" ]]; then
3121 if [[ -f $TMPDIR/.zfsd_enabled_during_stf_zfs_tests ]]; then
3125 $RM -f $TMPDIR/.zfsd_enabled_during_stf_zfs_tests
3135 typeset -i tvd=$2
3138 $ZDB -l $vdev | $AWK -v tvd=$tvd -v prop="${propname}:" '
3142 /^ [a-z]+/ && ($1==prop) { print $2; exit; }
3156 typeset offcol=$(echo $dva | cut -f2 -d:)
3157 typeset -i offset="0x${offcol}"
3177 typeset -i ncols=$2
3178 typeset -i ashift=$3
3180 typeset -i offset=0x$(echo $dva | cut -f2 -d:)
3183 typeset -i ioff=$(( (offset + ncols - 1) / ncols ))
3196 # Valid toplevel vdev types are mirror, raidz[1-3], leaf (which can be a
3204 typeset -i tvd=$2
3206 $ZPOOL status $pool | $AWK -v want_tvd=$tvd '
3208 start = 0; tvd = -1; lvd = -1;
3229 /^\t (mirror|raidz[1-3])-[0-9]+/ {
3234 /^\t [\/A-Za-z]+/ {
3246 /^\t spare-[0-9]+/ { next; }
3247 /^\t [\/A-Za-z]+/ {
3253 /^\t [\/A-Za-z]+/ {
3269 typeset -i leaf_vdev_num=$3
3271 # vdevs are normally 0-indexed while arguments are 1-indexed.
3275 pool=$(echo $poollike | sed -e 's,[/@].*,,g')
3276 tvd=$(echo $dva | cut -d: -f1)
3278 set -- $(vdevs_for_tvd $pool $tvd)
3306 typeset -i level=$3
3307 typeset -i offset=$4
3308 typeset -i dva_num=$5
3310 typeset -li blksz=0
3311 typeset -li blknum=0
3312 typeset -li startoff
3313 typeset -li inode
3315 eval `$STAT -s "$filepath"`
3321 $ZDB -P -vvvvv "$dataset/" $inode | \
3322 $AWK -v level=${level} -v dva_num=${dva_num} '
3334 match($2, /L[0-9]/) {
3335 if (substr($2, RSTART+1, RLENGTH-1) != level) { next; }
3338 dva = substr($3, RSTART+8, RLENGTH-9);
3347 typeset -i iblksz=$(echo $line | cut -d " " -f1)
3348 typeset -i dblksz=$(echo $line | cut -d " " -f2)
3352 typeset -i nbps_per_level
3353 typeset -i indsz
3354 typeset -i i=0
3370 typeset lineoffstr=$(echo $line | cut -d " " -f1)
3371 typeset -i lineoff=$(printf "%d" "0x${lineoffstr}")
3372 typeset dva="$(echo $line | cut -d " " -f2)"
3374 if [[ -n "$dva" ]] && (( lineoff == startoff )); then
3375 echo $line | cut -d " " -f2
3390 typeset -i leaf_vdev_num="$3"
3393 [ $? -ne 0 ] && log_fail "ERROR: Can't find file $filepath on $dataset"
3396 vdev=$(echo $vdoff | cut -d: -f1)
3397 ashift=$(echo $vdoff | cut -d: -f2)
3398 off=$(echo $vdoff | cut -d: -f3)
3402 log_must $DD if=/dev/urandom bs=$blocksize of=$vdev seek=$off count=1 conv=notrunc
3411 # the -d argument will be the value of the current iteration. It
3421 typeset -i num_files=$2
3422 typeset -i write_count=$3
3423 typeset -i blocksz=$4
3424 typeset -i i
3436 log_must $FILE_WRITE -o create -c $write_count \
3437 -f ${basename}.$i -b $blocksz -d $d
3439 [ -n "$snapbase" ] && log_must $ZFS snapshot ${snapbase}.${i}
3446 [ -z "$child_pids" ] && return
3459 typeset -i num=$2
3463 [ ! -f "$busyfile" ] && break
3470 log_must $PS -p $pid