diff mbox

[36/42] mkfs: factor AG alignment

Message ID 20170830234447.GF17782@dastard (mailing list archive)
State Accepted
Headers show

Commit Message

Dave Chinner Aug. 30, 2017, 11:44 p.m. UTC
On Wed, Aug 30, 2017 at 09:50:46AM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
....

This patch needs this delta fix, otherwise large filesystems will be
configured wrongly.

Cheers,

Dave.
diff mbox

Patch

diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index bec12d473099..21394a1ae946 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -2707,7 +2707,7 @@  align_ag_geometry(
 	int		dsunit = cfg->dsunit;
 
 	if (!dsunit)
-		return;
+		goto validate;
 
 	/*
 	 * agsize is not a multiple of dsunit
@@ -2791,6 +2791,7 @@  an AG size that is one stripe unit smaller or larger, for example %llu.\n"),
 				(cfg->dblocks % cfg->agsize != 0);
 	}
 
+validate:
 	/*
 	 * If the last AG is too small, reduce the filesystem size
 	 * and drop the blocks.
@@ -2803,7 +2804,6 @@  an AG size that is one stripe unit smaller or larger, for example %llu.\n"),
 		ASSERT(cfg->agcount != 0);
 	}
 
-validate:
 	validate_ag_geometry(cfg->blocklog, cfg->dblocks,
 			     cfg->agsize, cfg->agcount);
 }