Messages in this thread Patch in this message | | | Date | Mon, 24 May 1999 14:09:01 +0200 | From | Jan Kara <> | Subject | Re: 2.2.7 NFS quota error |
| |
<snip> > [jamc@l034 jamc]$ dd if=/dev/zero of=kk bs=1024 count=14000 > 14000+0 records in > 14000+0 records out > ( still in quota but next to limit ) > > ( Now try to get some data into SAME file.... and crash ) > > [jamc@l034 jamc]$ dd if=/dev/zero of=kk bs=1024 count=1000 > dd: kk: Disc quota exceeded > 421+0 records in > 420+0 records out > [jamc@l034 jamc]$ quota > Disk quotas for user jamc (uid 16062): > Filesystem blocks quota limit grace files quota limit grace > cuentas:/users/cuentas > 15000* 11250 15000 7days 73 0 0 > ( whooops !!! what happened ) > > [jamc@l034 jamc]$ du -s . > 944 . > ( the real size: 521 original + 421 of "kk" file... but quota talks about the > sum of old an new "kk" file..... ) > > I've not been able to reproduce this error when using local ( non-NFS ) > filesystem in the server so seems to be NFS-related error I've been looking into the NFSD code. Now I can imagine this can happen ;-)... I've found one place on which NFSD does truncate and the inode isn't DQUOT_INIT (I don't say it can't be, I just don't see it nearby :-)) which can result exactly in described behaviour. Maybe you can try this 2 line patch and see whether it changes anything.
Honza.
--- linux/fs/nfsd/vfs.c Mon Apr 12 19:03:45 1999 +++ linux/fs/nfsd/vfs.c Sun May 23 22:13:59 1999 @@ -252,9 +252,11 @@ if (err) goto out_nfserr; /* N.B. Should we update the inode cache here? */ + DQUOT_INIT(inode); inode->i_size = iap->ia_size; if (inode->i_op && inode->i_op->truncate) inode->i_op->truncate(inode); + DQUOT_DROP(inode); mark_inode_dirty(inode); put_write_access(inode); iap->ia_valid &= ~ATTR_SIZE; | |