On Thu, Jul 02, 2020 at 09:07:54AM +1000, Dave Chinner wrote: > On Tue, Jun 30, 2020 at 08:43:01AM -0700, Darrick J. Wong wrote: > > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > > > Now that we've stopped using qcore entirely, drop it from the incore > > dquot. > > > > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > .... > > @@ -1180,7 +1184,6 @@ xfs_qm_dqflush( > > struct xfs_log_item *lip = &dqp->q_logitem.qli_item; > > struct xfs_buf *bp; > > struct xfs_dqblk *dqb; > > - struct xfs_disk_dquot *ddqp; > > xfs_failaddr_t fa; > > int error; > > > > @@ -1204,22 +1207,6 @@ xfs_qm_dqflush( > > if (error) > > goto out_abort; > > > > - /* > > - * Calculate the location of the dquot inside the buffer. > > - */ > > - dqb = bp->b_addr + dqp->q_bufoffset; > > - ddqp = &dqb->dd_diskdq; > > - > > - /* sanity check the in-core structure before we flush */ > > - fa = xfs_dquot_verify(mp, &dqp->q_core, dqp->q_id, 0); > > - if (fa) { > > - xfs_alert(mp, "corrupt dquot ID 0x%x in memory at %pS", > > - dqp->q_id, fa); > > - xfs_buf_relse(bp); > > - error = -EFSCORRUPTED; > > - goto out_abort; > > - } > > - > > fa = xfs_qm_dqflush_check(dqp); > > if (fa) { > > xfs_alert(mp, "corrupt dquot ID 0x%x in memory at %pS", > > @@ -1229,7 +1216,9 @@ xfs_qm_dqflush( > > goto out_abort; > > } > > > > - xfs_dquot_to_disk(ddqp, dqp); > > + /* Flush the incore dquot to the ondisk buffer. */ > > + dqb = bp->b_addr + dqp->q_bufoffset; > > + xfs_dquot_to_disk(&dqb->dd_diskdq, dqp); > > Oh, this is really hard to read now. d, q, b, and p are all the same > shape just at different rotations/mirroring, so this now just looks > like a jumble of random letter salad... > > Can you rename dqb to dqblk so it's clearly the pointer to the > on-disk dquot block and so easy to differentiate at a glance from > the in-memory dquot pointer? Ok. --D > Cheers, > > Dave. > -- > Dave Chinner > david@xxxxxxxxxxxxx