This fails on a 4GB, 4k physical sector size device:
# mkfs.xfs -f -l version=2,su=256k /dev/ram1
log size 2560 blocks too small, minimum size is 3264 blocks
....
The combination of 4k sectors and a log stripe unit increase the
minimum size of the log. We should be automatically calculating an
appropriate, valid log size when the user does not specify it.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
*/
logblocks = (dblocks << blocklog) / 2048;
logblocks = logblocks >> blocklog;
- logblocks = MAX(min_logblocks, logblocks);
}
+ /* Ensure the chosen size meets minimum log size requirements */
+ logblocks = MAX(min_logblocks, logblocks);
+
/* make sure the log fits wholly within an AG */
if (logblocks >= agsize)
logblocks = min_logblocks;