[PATCH] mkfs: log stripe unit fails to influence default log size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Dave Chinner <dchinner@xxxxxxxxxx>

This fails:

# mkfs.xfs -f -l version=2,su=256k /dev/ram1
log size 2560 blocks too small, minimum size is 3264 blocks
....

We should be automatically calculating an appropriate, valid log
size when the user does not specify it.

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
 mkfs/xfs_mkfs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 66711cb..5e10c4e 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -2441,9 +2441,11 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
 			 */
 			logblocks = (dblocks << blocklog) / 2048;
 			logblocks = logblocks >> blocklog;
-			logblocks = MAX(min_logblocks, logblocks);
 		}
 
+		/* Log size must exceed the minimum the geometry requires. */
+		logblocks = MAX(min_logblocks, logblocks);
+
 		/* make sure the log fits wholly within an AG */
 		if (logblocks >= agsize)
 			logblocks = min_logblocks;
-- 
2.0.0

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux