On Wed, Aug 30, 2017 at 09:50:49AM +1000, Dave Chinner wrote: > From: Dave Chinner <dchinner@xxxxxxxxxx> > > Signed-Off-By: Dave Chinner <dchinner@xxxxxxxxxx> > --- .... > +static void > +align_internal_log( > + struct mkfs_params *cfg, > + struct xfs_mount *mp, > + int sunit) > +{ > + uint64_t agspace; > + > + /* round up log start if necessary */ > + if ((cfg->logstart % sunit) != 0) > + cfg->logstart = ((cfg->logstart + (sunit - 1)) / sunit) * sunit; > + > + /* round up/down the log size now */ > + align_log_size(cfg, sunit); > + > + /* check the aligned log still fits in an AG. */ > + agspace = cfg->agsize - libxfs_prealloc_blocks(mp); > + if (cfg->logblocks > agspace - XFS_FSB_TO_AGBNO(mp, cfg->logstart)) { This breaks xfs/250. Should be: if (cfg->logblocks > cfg->agsize - XFS_FSB_TO_AGBNO(mp, cfg->logstart)) { and the agspace variable goes away. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx -- 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