On Wed, May 20, 2020 at 03:41:03PM -0500, Eric Sandeen wrote: > On 5/20/20 3:36 PM, Darrick J. Wong wrote: > > On Wed, May 20, 2020 at 01:41:25PM -0500, Eric Sandeen wrote: > >> xfs_get_defquota() currently takes an xfs_dquot, and from that obtains > >> the type of default quota we should get (user/group/project). > >> > >> But early in init, we don't have access to a fully set up quota, and > >> so we will fail to set these defaults. > >> > >> Switch xfs_get_defquota to take an explicit type, and add a helper > >> function to obtain that type from an xfs_dquot for the existing > >> callers. > > > > Ah, so this patch isn't itself fixing anything, it's preparing code for > > something that happens in the next patch. > > yeah sorry that could be clearer, "fix" on the brain, can edit commit log. Sorry, stream of consciosuness on my part, nothing in this patch actually said "fix". > >> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx> > > ... > > >> > >> +static inline int > >> +xfs_dquot_type(struct xfs_dquot *dqp) > >> +{ > >> + if (XFS_QM_ISUDQ(dqp)) > >> + return XFS_DQ_USER; > >> + else if (XFS_QM_ISGDQ(dqp)) > >> + return XFS_DQ_GROUP; > >> + else { > >> + ASSERT(XFS_QM_ISPDQ(dqp)); > >> + return XFS_DQ_PROJ; > > > > /me suspects this could be tidier, e.g. > > > > if (UDQ) > > return XFS_DQ_USER; > > if (GDQ) > > return XFS_DQ_GROUP; > > ASSERT(PDQ); > > return XFS_DQ_PROJ; > > > > Otherwise the rest looks ok. > > I suppose, so respin or no? I fixed up this patch and the next one in my test tree, let's see what breaks. I retested all the tests I whined about earlier and they're fixed now except for generic/594 which might just be ... busted? Or maybe I forgot to send a patch...? --D