Re: The question of Q_XQUOTARM ioctl

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

 



On Mon, Jan 03, 2022 at 06:34:56PM -0800, Darrick J. Wong wrote:
> > 
> > I don't know the right intention for Q_XQUOTARM now. Can you give me
> > some advise? Or, we should remove Q_XQUOTARM ioctl and
> > xfs_qm_scall_trunc_qfile code.
> 
> I think xfs_qm_scall_trunc_qfiles probably should be doing:
> 
> 	if (xfs_has_quota(mp) || flags == 0 ||
> 	    (flags & ~XFS_QMOPT_QUOTALL)) {
> 		xfs_debug(...);
> 		return -EINVAL;
> 	}
> 
> Note the inversion in the has_quota test.  That would make it so that
> you can truncate the quota files if quota is not on.

Yes, that sounds reasonable.  Although I'd split the xfs_has_quota
file into a separate check with a separate debug message.



[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