Re: [PATCH 08/12] xfs: flush eof/cowblocks if we can't reserve quota for inode creation

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

 



On Mon, Feb 01, 2021 at 12:35:40PM +0000, Christoph Hellwig wrote:
> > +xfs_blockgc_free_dquots(
> > +	struct xfs_dquot	*udqp,
> > +	struct xfs_dquot	*gdqp,
> > +	struct xfs_dquot	*pdqp,
> >  	unsigned int		eof_flags)
> >  {
> >  	struct xfs_eofblocks	eofb = {0};
> > -	struct xfs_dquot	*dq;
> > +	struct xfs_mount	*mp = NULL;
> >  	bool			do_work = false;
> >  	int			error;
> >  
> > +	if (!udqp && !gdqp && !pdqp)
> > +		return 0;
> > +	if (udqp)
> > +		mp = udqp->q_mount;
> > +	if (!mp && gdqp)
> > +		mp = gdqp->q_mount;
> > +	if (!mp && pdqp)
> > +		mp = pdqp->q_mount;
> 
> I think just passing the xfs_mount as the first argument would be a
> little simpler and produce better code.

Changed.

> >  	error = xfs_trans_reserve_quota_icreate(tp, udqp, gdqp, pdqp, dblocks);
> > +	if (!retried && (error == -EDQUOT || error == -ENOSPC)) {
> 
> Same minor nit as for the last patch.

This too.

--D

> Otherwise looks good:
> 
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux