Make the output of the quota proc files more readable by removing
needless whitespace that causes it to wrap over a single line.
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I80fbd42dea865dff1d106724dbf69946d23ebbe5
Reviewed-on: https://review.whamcloud.com/43099
Reviewed-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
seq_printf(p, "- %-8s %llu\n", "id:", *((__u64 *)key));
if (fid_is_acct(fid))
seq_printf(p, "- %-8s %llu\n", "id:", *((__u64 *)key));
if (fid_is_acct(fid))
- seq_printf(p, " %-8s { inodes: %20llu, kbytes: %20llu }\n", "usage:",
- ((struct lquota_acct_rec *)rec)->ispace,
+ seq_printf(p, " %-8s { inodes: %12llu, kbytes: %12llu }\n",
+ "usage:", ((struct lquota_acct_rec *)rec)->ispace,
toqb(((struct lquota_acct_rec *)rec)->bspace));
else if (fid_seq(fid) == FID_SEQ_QUOTA_GLB ||
fid_seq(fid) == FID_SEQ_LOCAL_NAME)
toqb(((struct lquota_acct_rec *)rec)->bspace));
else if (fid_seq(fid) == FID_SEQ_QUOTA_GLB ||
fid_seq(fid) == FID_SEQ_LOCAL_NAME)
- seq_printf(p, " %-8s { hard: %20llu, soft: %20llu, granted: %20llu, time: %20llu }\n",
+ seq_printf(p, " %-8s { hard: %12llu, soft: %12llu, granted: %12llu, time: %15llu }\n",
"limits:",
((struct lquota_glb_rec *)rec)->qbr_hardlimit,
((struct lquota_glb_rec *)rec)->qbr_softlimit,
"limits:",
((struct lquota_glb_rec *)rec)->qbr_hardlimit,
((struct lquota_glb_rec *)rec)->qbr_softlimit,
seq_printf(m, "pool:\n"
" id: %u\n"
" type: %s\n"
seq_printf(m, "pool:\n"
" id: %u\n"
" type: %s\n"
- " ref: %d\n"
- " least qunit: %lu\n",
+ " refcount: %d\n"
+ " least_qunit: %lu\n",
0,
RES_NAME(pool->qpi_rtype),
atomic_read(&pool->qpi_ref),
0,
RES_NAME(pool->qpi_rtype),
atomic_read(&pool->qpi_ref),
for (type = 0; type < LL_MAXQUOTAS; type++)
seq_printf(m, " %s:\n"
for (type = 0; type < LL_MAXQUOTAS; type++)
seq_printf(m, " %s:\n"
- " #slv: %d\n"
- " #lqe: %d\n",
+ " quota_servers: %d\n"
+ " quota_entries: %d\n",
qtype_name(type),
qpi_slv_nr(pool, type),
atomic_read(&pool->qpi_site[type]->lqs_hash->hs_count));
qtype_name(type),
qpi_slv_nr(pool, type),
atomic_read(&pool->qpi_site[type]->lqs_hash->hs_count));
quota_scan() {
local local_ugp=$1
local local_id=$2
quota_scan() {
local local_ugp=$1
local local_id=$2
if [ "$local_ugp" == "a" -o "$local_ugp" == "u" ]; then
$LFS quota -v -u $local_id $DIR
if [ "$local_ugp" == "a" -o "$local_ugp" == "u" ]; then
$LFS quota -v -u $local_id $DIR
- log "Files for user ($local_id):"
+ count=$($LFS find --user $local_id $DIR | wc -l)
+ log "Files for user ($local_id), count=$count:"
($LFS find --user $local_id $DIR | head -n 4 |
xargs stat 2>/dev/null)
fi
if [ "$local_ugp" == "a" -o "$local_ugp" == "g" ]; then
$LFS quota -v -g $local_id $DIR
($LFS find --user $local_id $DIR | head -n 4 |
xargs stat 2>/dev/null)
fi
if [ "$local_ugp" == "a" -o "$local_ugp" == "g" ]; then
$LFS quota -v -g $local_id $DIR
- log "Files for group ($local_id):"
+ count=$($LFS find --group $local_id $DIR | wc -l)
+ log "Files for group ($local_id), count=$count:"
($LFS find --group $local_id $DIR | head -n 4 |
xargs stat 2>/dev/null)
fi
($LFS find --group $local_id $DIR | head -n 4 |
xargs stat 2>/dev/null)
fi
is_project_quota_supported || return 0
if [ "$local_ugp" == "a" -o "$local_ugp" == "p" ]; then
$LFS quota -v -p $TSTPRJID $DIR
is_project_quota_supported || return 0
if [ "$local_ugp" == "a" -o "$local_ugp" == "p" ]; then
$LFS quota -v -p $TSTPRJID $DIR
- log "Files for project ($TSTPRJID):"
+ count=$($LFS find --projid $TSTPRJID $DIR | wc -l)
+ log "Files for project ($TSTPRJID), count=$count:"
($LFS find --projid $TSTPRJID $DIR | head -n 4 |
xargs stat 2>/dev/null)
fi
($LFS find --projid $TSTPRJID $DIR | head -n 4 |
xargs stat 2>/dev/null)
fi
local testfile="$DIR/$tdir/$tfile-0"
local least_qunit=$(do_facet mds1 $LCTL get_param -n \
qmt.$FSNAME-QMT0000.md-0x0.info |
local testfile="$DIR/$tdir/$tfile-0"
local least_qunit=$(do_facet mds1 $LCTL get_param -n \
qmt.$FSNAME-QMT0000.md-0x0.info |
- awk '/least qunit/{ print $3 }')
+ sed -e 's/least qunit/least_qunit/' |
+ awk '/least_qunit/{ print $2 }')
local limit
[ "$SLOW" = "no" ] && limit=$((least_qunit * 2)) ||
limit=$((least_qunit * 1024))
local limit
[ "$SLOW" = "no" ] && limit=$((least_qunit * 2)) ||
limit=$((least_qunit * 1024))
+ echo "least_qunit: '$least_qunit', limit: '$limit'"
local free_inodes=$(mdt_free_inodes 0)
echo "$free_inodes free inodes on master MDT"
local free_inodes=$(mdt_free_inodes 0)
echo "$free_inodes free inodes on master MDT"