# cross check blks, softblks, hardblks <-> quota, xfs_db
quota -$type $id | tee -a $seq.full | perl -ne '
- if (m,^\s*'$SCRATCH_DEV'\s+(\d+)\s+(\d+)\s+(\d+), ||
+ if (m[^\s*'$SCRATCH_DEV'\s+(\d+)\s+(\d+)\s+(\d+)] ||
($next == 1 && m,^\s+(\d+)\s+(\d+)\s+(\d+),)) {
print "used_blocks=", $1, "\n";
print "soft_blocks=", $2, "\n";
print "hard_blocks=", $3, "\n";
$next = 0;
}
- elsif (m,^\s*'$SCRATCH_DEV',) { # devfs (long) names
+ elsif (m[^\s*'$SCRATCH_DEV']) { # devfs (long) names
$next = 1;
}' | LC_COLLATE=POSIX sort >$tmp.quota
{
set -
perl -ne '
- if (/^meta-data=([\w|\/.-]+)\s+isize=(\d+)\s+agcount=(\d+), agsize=(\d+) blks/) {
+ if (/^meta-data=([\w,|\/.-]+)\s+isize=(\d+)\s+agcount=(\d+), agsize=(\d+) blks/) {
print STDERR "ddev=$1\nisize=$2\nagcount=$3\nagsize=$4\n";
print STDOUT "meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks\n";
}
{
head -$1 | perl -ne "
s/^(\w+)\s+([-|+])/[NAME] \2/g;
- s,$SCRATCH_DEV,[DEVICE],g;
+ s($SCRATCH_DEV)([DEVICE])g;
print"
}