Re: [PATCH V3 2/3] quota: Add quota claim and release reserved quota

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon 08-12-08 17:49:22, Mingming Cao wrote:
> > > +	/* Dirtify all the dquots - this can block when journalling */
> > > +	for (cnt = 0; cnt < MAXQUOTAS; cnt++)
> > > +		if (inode->i_dquot[cnt])
> > > +			mark_dquot_dirty(inode->i_dquot[cnt]);
> > > +	up_read(&sb_dqopt(inode->i_sb)->dqptr_sem);
> > > +
> > > +	/* Update inode bytes */
> > > +	inode_add_bytes(inode, number);
> >   And this should be called from under dq_data_lock from
> > dquot_claim_reserved_space().
> >   BTW: This reminds me that you should also modify dquot_transfer() function.
> > Because that should not only transfer i_blocks sectors from one user
> > to another but it has to also transfer the amount reserved for that inode...
> > I think the easiest way around this would be to change i_blocks already when
> > reservation is acquired (and than substract it when some of it is given back).
> > 
> 
> I did looked at dquot_transfer() (not very deep though) before, I wasn't
> sure who is calling/needs dquot_transfer()? I noticed ext23 has the
> transfer operation defined, but I dont see it's being used. Any hint?
  ext[34]_setattr() calls DQUOT_TRANSFER() when owner of an inode is being
changed. This function subtracts the amount of space file occupies from
originating user and adds it to the destination user.

									Honza
-- 
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux