To me, this makes perfect sense. You can't really get the used block
count to change until the blocks have actually been written, and teh
allocation tables written along with them.
It seems to me, and I'm not involved in any way with the development
project, that you'd be asking for a lot of trouble to try to update part
of the allocation table without actually having had the data written to
disk.
On Fri, 4 Jan 2002, Brian Johnson wrote:
> 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
>
>
|