From a212110f1a4fbd7d701bdebaba13919e8e6b6270 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Thu, 2 May 2002 21:50:05 +0000 Subject: [PATCH] Bump to 2.0.5 --- VERSION | 2 +- doc/CHANGES | 11 ++++++++++- mkfs/xfs_mkfs.c | 33 ++++++++++++++++++++++++++++++--- 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index d6fb318cb..a889a928b 100644 --- a/VERSION +++ b/VERSION @@ -3,5 +3,5 @@ # PKG_MAJOR=2 PKG_MINOR=0 -PKG_REVISION=4 +PKG_REVISION=5 PKG_BUILD=0 diff --git a/doc/CHANGES b/doc/CHANGES index 2209599f8..961fc4ec0 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,4 +1,13 @@ -[current cvs] +xfsprogs-2.0.5 (02 May 2002) + - size AGs so that they do not always start on the same + part of a striped disk + - Fix an off-by-one error on rounding down an AG that is + too small to be an AG + - don't auto-grow the log to be larger than an AG + - change the error philosophy for -d su=,sw= away from forcing + the XFS stripe size to match the XLV stripe size and instead + accept, with a warning, the stripe unit & width supplied on + the commandline. - Update xfs_growfs man page - Don't build libxlog.a with DEBUG enabled - xfs_db fixes from ASANO Masahiro at NEC diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c index 7d093c391..e6d711e48 100644 --- a/mkfs/xfs_mkfs.c +++ b/mkfs/xfs_mkfs.c @@ -1401,6 +1401,7 @@ main(int argc, char **argv) if (!daflag && (dblocks % agsize < XFS_AG_MIN_BLOCKS(blocklog))) { dblocks -= dblocks % agsize; + agcount--; } /* @@ -1453,13 +1454,11 @@ main(int argc, char **argv) fprintf(stderr, "%s: " "Specified data stripe unit %d is not the same as the xlv stripe unit %d\n", progname, dsunit, xlv_dsunit); - exit(1); } if (xlv_dswidth && xlv_dswidth != dswidth) { fprintf(stderr, "%s: " -"Specified data stripe width (%d) is not the same as the xlv stripe width (%d)\n", +"Specified data stripe width %d is not the same as the xlv stripe width %d\n", progname, dswidth, xlv_dswidth); - exit(1); } } else { dsunit = xlv_dsunit; @@ -1515,6 +1514,26 @@ main(int argc, char **argv) } } } + if ((agsize % dswidth) == 0) { + /* This is a non-optimal configuration because all AGs + * start on the same disk in the stripe. Decreasing + * the AG size by one sunit will guarantee that this + * does not happen + */ + tmp_agsize = agsize - dsunit; + if (tmp_agsize < XFS_AG_MIN_BLOCKS(blocklog)) + tmp_agsize = agsize + dsunit; + if (daflag || dasize) { + fprintf(stderr, +"Warning: AG size is a multiple of stripe width. This can cause performance\n" +"problems by aligning all AGs on the same disk. To avoid this, rerun mkfs with\n" +"an AG size that is one stripe unit smaller, for example %lld\n", + tmp_agsize); + } else { + agsize = tmp_agsize; + agcount = dblocks/agsize + (dblocks % agsize != 0); + } + } } else { if (nodsflag) dsunit = dswidth = 0; @@ -1535,6 +1554,14 @@ main(int argc, char **argv) sbp->sb_agblklog = (__uint8_t)libxfs_log2_roundup((unsigned int)agsize); mp->m_blkbb_log = sbp->sb_blocklog - BBSHIFT; if (loginternal) { + /* + * Readjust the log size to fit within an AG if it was sized + * automaticly. + */ + if (!logsize) { + logblocks = MIN(logblocks, + agsize - XFS_PREALLOC_BLOCKS(mp)); + } if (logblocks > agsize - XFS_PREALLOC_BLOCKS(mp)) { fprintf(stderr, "internal log size %lld too large, must fit in allocation group\n", -- 2.47.2