lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 10 Dec 2008 12:21:40 +0100
From:	Jan Kara <jack@...e.cz>
To:	Mingming Cao <cmm@...ibm.com>
Cc:	linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org
Subject: Re: [PATCH V3 2/3] quota: Add quota claim and release reserved
	quota

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@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ