Re: [PATCH v2 10/13] xfs: replace XFS_QMOPT_DQALLOC with boolean

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

 



On Tue, May 01, 2018 at 09:45:04AM -0400, Brian Foster wrote:
> On Sun, Apr 29, 2018 at 10:47:52PM -0700, Darrick J. Wong wrote:
> > Ugh, wrong commit message.  Here's an updated one now that the flag is
> > gone entirely.
> > 
> 
> Just FYI.. git applies this with the above as the commit log message and
> the text below is tossed. ;P

D'oh.  Yeah, I screwed up the git-to-mail export. :(

This all will be done correctly in the git tree I swear.

> > --D
> > 
> > ---
> > Subject: [PATCH] xfs: replace XFS_QMOPT_DQALLOC with a simple boolean
> > 
> > DQALLOC is only ever used with xfs_qm_dqget*, and the only flag that the
> > _dqget family of functions cares about is DQALLOC.  Therefore, change
> > it to a boolean 'can alloc?' flag for the dqget interfaces where that
> > makes sense.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> > ---
> >  fs/xfs/libxfs/xfs_quota_defs.h |    1 -
> >  fs/xfs/xfs_dquot.c             |    8 ++++----
> >  fs/xfs/xfs_dquot.h             |    2 +-
> >  fs/xfs/xfs_qm.c                |   12 +++++-------
> >  fs/xfs/xfs_qm_bhv.c            |    2 +-
> >  fs/xfs/xfs_qm_syscalls.c       |    9 ++++-----
> >  6 files changed, 15 insertions(+), 19 deletions(-)
> > 
> ...
> > diff --git a/fs/xfs/xfs_qm_bhv.c b/fs/xfs/xfs_qm_bhv.c
> > index 531e8224dcb6..1fa3d6d6db40 100644
> > --- a/fs/xfs/xfs_qm_bhv.c
> > +++ b/fs/xfs/xfs_qm_bhv.c
> > @@ -72,7 +72,7 @@ xfs_qm_statvfs(
> >  	xfs_mount_t		*mp = ip->i_mount;
> >  	xfs_dquot_t		*dqp;
> >  
> > -	if (!xfs_qm_dqget(mp, xfs_get_projid(ip), XFS_DQ_PROJ, 0, &dqp)) {
> > +	if (!xfs_qm_dqget(mp, xfs_get_projid(ip), XFS_DQ_PROJ, true, &dqp)) {
> 
> False? Otherwise looks fine:

Yep, that should be false.  Fixed.

--D

> Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>
> 
> >  		xfs_fill_statvfs_from_dquot(statp, dqp);
> >  		xfs_qm_dqput(dqp);
> >  	}
> > diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
> > index b9243f554697..3e05d300b14e 100644
> > --- a/fs/xfs/xfs_qm_syscalls.c
> > +++ b/fs/xfs/xfs_qm_syscalls.c
> > @@ -425,7 +425,7 @@ xfs_qm_scall_setqlim(
> >  	 * a reference to the dquot, so it's safe to do this unlock/lock without
> >  	 * it being reclaimed in the mean time.
> >  	 */
> > -	error = xfs_qm_dqget(mp, id, type, XFS_QMOPT_DQALLOC, &dqp);
> > +	error = xfs_qm_dqget(mp, id, type, true, &dqp);
> >  	if (error) {
> >  		ASSERT(error != -ENOENT);
> >  		goto out_unlock;
> > @@ -696,11 +696,10 @@ xfs_qm_scall_getquota(
> >  	int			error;
> >  
> >  	/*
> > -	 * Try to get the dquot. We don't want it allocated on disk, so
> > -	 * we aren't passing the XFS_QMOPT_DOALLOC flag. If it doesn't
> > -	 * exist, we'll get ENOENT back.
> > +	 * Try to get the dquot. We don't want it allocated on disk, so don't
> > +	 * set doalloc. If it doesn't exist, we'll get ENOENT back.
> >  	 */
> > -	error = xfs_qm_dqget(mp, id, type, 0, &dqp);
> > +	error = xfs_qm_dqget(mp, id, type, false, &dqp);
> >  	if (error)
> >  		return error;
> >  
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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