public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [REVIEW] fix mkfs.xfs agcount between 64 and 128MB
@ 2008-02-25  3:45 Barry Naujok
  2008-02-25  4:21 ` Niv Sardi
  2008-02-25  7:03 ` [REVIEW #2] fix mkfs.xfs agcount between 16 " Barry Naujok
  0 siblings, 2 replies; 6+ messages in thread
From: Barry Naujok @ 2008-02-25  3:45 UTC (permalink / raw)
  To: xfs@oss.sgi.com

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

With the AG count = 4 changes for a single disk, device sizes between 64MB  
and 128MB still scale from 4 to 8 AGs. This is causing some questions!

The attached patch enforces 4 AGs for devices between 64 and 128MB  
(including multi-disk setups, which should be extremely rare at this  
size). This means the AG size will vary from 16 to 32MB depending on the  
device size.

Barry.



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix_agcount_in_mkfs_for_small_sizes.patch --]
[-- Type: text/x-patch; name=fix_agcount_in_mkfs_for_small_sizes.patch, Size: 1336 bytes --]

Index: ci/xfsprogs/mkfs/xfs_mkfs.c
===================================================================
--- ci.orig/xfsprogs/mkfs/xfs_mkfs.c	2008-02-25 14:36:56.000000000 +1100
+++ ci/xfsprogs/mkfs/xfs_mkfs.c	2008-02-25 14:39:38.249637450 +1100
@@ -412,7 +412,7 @@
 	/*
 	 * First handle the extremes - the points at which we will
 	 * always use the maximum AG size, the points at which we
-	 * always use the minimum, and a "small-step" for 16-128MB.
+	 * always use the minimum, and a "small-step" for 16-64MB.
 	 *
 	 * These apply regardless of storage configuration.
 	 */
@@ -423,13 +423,13 @@
 		blocks = dblocks;
 		count = 1;
 		goto done;
-	} else if (dblocks < MEGABYTES(128, blocklog)) {
+	} else if (dblocks < MEGABYTES(64, blocklog)) {
 		blocks = MEGABYTES(16, blocklog);
 		goto done;
 	}
 
 	/*
-	 * Sizes between 128MB and 32TB:
+	 * Sizes between 64MB and 32TB:
 	 *
 	 * For the remainder we choose an AG size based on the
 	 * number of data blocks available, trying to keep the
@@ -444,7 +444,7 @@
 	 * scale up smoothly between min/max AG sizes.
 	 */
 
-	if (!multidisk) {
+	if (!multidisk || dblocks < MEGABYTES(128, blocklog)) {
 		if (dblocks >= TERABYTES(4, blocklog)) {
                         blocks = XFS_AG_MAX_BLOCKS(blocklog);
                         goto done;

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-26  0:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-25  3:45 [REVIEW] fix mkfs.xfs agcount between 64 and 128MB Barry Naujok
2008-02-25  4:21 ` Niv Sardi
2008-02-25  4:44   ` Barry Naujok
2008-02-25  7:03 ` [REVIEW #2] fix mkfs.xfs agcount between 16 " Barry Naujok
2008-02-25  7:11   ` [REVIEW #3] " Barry Naujok
2008-02-26  0:47     ` Niv Sardi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox