Re: Bugfix in dquot_transfer()

2000-09-17 Thread Alexander Viro
On Sun, 17 Sep 2000, Jan Kara wrote: > > How about the following: > > * dquot_{alloc,free}_block() _never_ blocks. > > * we have 3 inlined helper functions - alloc_block(), free_block() and > > change_xid(). They get exclusion (BKL, spinlock, whatever) and update both > > quota and i_bl

Re: Bugfix in dquot_transfer()

2000-09-17 Thread Jan Kara
> How about the following: > * dquot_{alloc,free}_block() _never_ blocks. > * we have 3 inlined helper functions - alloc_block(), free_block() and > change_xid(). They get exclusion (BKL, spinlock, whatever) and update both > quota and i_blocks. > > Consequences: > * quota for f

Re: Bugfix in dquot_transfer()

2000-09-14 Thread Alexander Viro
On Thu, 14 Sep 2000, Jan Kara wrote: > > > of blocks after notify_change() once more all the quota will be counted > > > properly. The only problem is that quota can be exceeded this way. We have to >check > > > > Nope. You've just shifted the race window (and inverted the > > effect) - t

Re: Bugfix in dquot_transfer()

2000-09-14 Thread Jan Kara
> > of blocks after notify_change() once more all the quota will be counted > > properly. The only problem is that quota can be exceeded this way. We have to check > > Nope. You've just shifted the race window (and inverted the > effect) - think what happens if you've got new allocations af

Re: Bugfix in dquot_transfer()

2000-09-14 Thread Alexander Viro
On Thu, 14 Sep 2000, Jan Kara wrote: > Yes I agree that if notify_change() blocks we still can account imprecisely. > I think I didn't understand your proposal. The pointers to structures where > quota should be charged are already in inode. And if we count current number Sorry, it w

Re: Bugfix in dquot_transfer()

2000-09-14 Thread Jan Kara
> On Mon, 4 Sep 2000, Jan Kara wrote: > > > Hello. > > > > Following patch fixes bug in dquot_transfer() - while we were sleeping > > i_blocks might change and so number quota was miscounted. Patches are > > against 2.2.16 and 2.4.0-test6 (but should apply well on newer versions). > >

Re: Bugfix in dquot_transfer()

2000-09-10 Thread Carlos Carvalho
Jan Kara ([EMAIL PROTECTED]) wrote on 4 September 2000 08:25: > Following patch fixes bug in dquot_transfer() - while we were sleeping >i_blocks might change and so number quota was miscounted. Patches are >against 2.2.16 and 2.4.0-test6 (but should apply well on newer versions). I seem to ha

Re: Bugfix in dquot_transfer()

2000-09-03 Thread Alexander Viro
On Mon, 4 Sep 2000, Jan Kara wrote: > Hello. > > Following patch fixes bug in dquot_transfer() - while we were sleeping > i_blocks might change and so number quota was miscounted. Patches are > against 2.2.16 and 2.4.0-test6 (but should apply well on newer versions). Umm... It sti