I noticed the block usage amount repquota reports is out of date for about
40 sec after a file is written or until sync is run.
For example,
# /usr/sbin/repquota /users | grep root ;\
dd count=1024 bs=1024 if=/dev/zero of=writetest ;\
/usr/sbin/repquota /users | grep root ;\
sleep 30 ;\
/usr/sbin/repquota /users | grep root ;\
sleep 10 ;\
/usr/sbin/repquota /users | grep root
Produces:
root -- 6176 0 0 19 0 0
1024+0 records in
1024+0 records out
root -- 6176 0 0 20 0 0
root -- 6176 0 0 20 0 0
root -- 7200 0 0 20 0 0
Running sync after the write gives up to date usage data:
# /usr/sbin/repquota /users | grep root ;\
dd count=1024 bs=1024 if=/dev/zero of=writetest2 ;\
sync ;\
/usr/sbin/repquota /users | grep root
root -- 7200 0 0 20 0 0
1024+0 records in
1024+0 records out
root -- 8224 0 0 21 0 0
Is there a way to get the number of used blocks that is not out of date? I
am running kernel 2.4.17 from CVS and also have tested this on the 1.0.2a
release.
Thanks,
Brian
|