Re: [PATCH 10/13] xfs: replace XFS_QMOPT_DQALLOC with XFS_DQGET_{ALLOC, EXISTS}

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

 



On Mon, Apr 23, 2018 at 07:33:41PM +0200, Christoph Hellwig wrote:
> On Sun, Apr 22, 2018 at 08:07:05AM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> > 
> > 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
> > the name to make it clear that it's only a dqget flag.  Since these are
> > modes and no longer bit flags, define a XFS_DQGET_EXISTS flag and
> > convert all the callers.
> 
> I'm almost tempted to just have a 'bool alloc' argument instead.

I agree. I'm not a big fan of defining the 'exists' semantic for the
no-flags case. To me, it reads as a behavior modifier until/unless you
catch the fact that it's defined to zero. An alloc param should
self-document the behavior nicely, imo.

Brian

> --
> 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