xfs
[Top] [All Lists]

Re: Quota block usage out of date until sync

To: Brian Johnson <brian@xxxxxxxxxxxxxx>
Subject: Re: Quota block usage out of date until sync
From: Mike Burger <mburger@xxxxxxxxxxxxxxxxx>
Date: Fri, 4 Jan 2002 16:45:45 -0500 (EST)
Cc: Linux XFS <linux-xfs@xxxxxxxxxxx>
In-reply-to: <Pine.LNX.4.33L2.0201041525450.27594-100000@xxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
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
> 
> 


<Prev in Thread] Current Thread [Next in Thread>