Improve information about logbsize valid values
PATCH 1/1 Improve information about logbsize valid values
From: Carlos Maiolino <[email protected]>
Valid values for logbsize depends on whether log_sunit is set on the filesystem or not and if logbsize is manually set or not.
When manually set, logbsize must be one of the speficied values - 32k to 256k inclusive in power-of-to increments. And, the specified value must also be a multiple of log_sunit.
The default configuration for v2 logs uses a relaxed restriction, setting logbsize to log_sunit, independent if it is one of the valid values or not - also implicitly ignoring the power of two restriction.
Instead of changing valid possible values for logbsize, increasing the testing matrix and allowing users to use some dubious configuration, just update the man page to describe this difference in behavior when manually setting logbsize or leave it to defaults.
This has originally been found by an user attempting to manually set logbsize to the same value picked by the default configuration just so to receive an error message as result.
--- man/man5/xfs.5 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
man/man5/xfs.5 +7 -5
@@ -246,16 +246,18 @@ controls the size of each buffer and so is also relevant to this case. .TP .B logbsize=value -Set the size of each in-memory log buffer. The size may be +Set the size of each in-memory log buffer. The size may be specified in bytes, or in kibibytes (KiB) with a "k" suffix. +If set manually, logbsize must be one of the specified valid +sizes and a multiple of the log stripe unit - configured at mkfs time. +.sp Valid sizes for version 1 and version 2 logs are 16384 (value=16k) and 32768 (value=32k). Valid sizes for version 2 logs also -include 65536 (value=64k), 131072 (value=128k) and 262144 (value=256k). The -logbsize must be an integer multiple of the log -stripe unit configured at mkfs time. +include 65536 (value=64k), 131072 (value=128k) and 262144 (value=256k). .sp The default value for version 1 logs is 32768, while the -default value for version 2 logs is max(32768, log_sunit). +default value for version 2 logs is max(32768, log_sunit) even if +log_sunit does not match one of the valid values above. .TP .BR logdev=device " and " rtdev=device Use an external log (metadata journal) and/or real-time device.
Signature · 1 line
2.51.0
Quoted 42 lines · On Tue, Aug 26, 2025 at 02:23:12PM +0200, [email protected] wrote:
From: Carlos Maiolino <[email protected]>
Valid values for logbsize depends on whether
log_sunitis set on the filesystem or not and if logbsize is manually set or not.When manually set, logbsize must be one of the speficied values - 32k to 256k inclusive in power-of-to increments. And, the specified value must also be a multiple of
log_sunit.The default configuration for v2 logs uses a relaxed restriction, setting logbsize to
log_sunit, independent if it is one of the valid values or not - also implicitly ignoring the power of two restriction.Instead of changing valid possible values for logbsize, increasing the testing matrix and allowing users to use some dubious configuration, just update the man page to describe this difference in behavior when manually setting logbsize or leave it to defaults.
This has originally been found by an user attempting to manually set logbsize to the same value picked by the default configuration just so to receive an error message as result.
Signed-off-by Carlos Maiolino <[email protected]>--- man/man5/xfs.5 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)man/man5/xfs.5 +4
-1@@ -246,16 +246,18 @@ controls the size of each buffer and so is also relevant to this case. .TP .B logbsize=value -Set the size of each in-memory log buffer. The size may be +Set the size of each in-memory log buffer. The size may be specified in bytes, or in kibibytes (KiB) with a "k" suffix. +If set manually, logbsize must be one of the specified valid +sizes and a multiple of the log stripe unit - configured at mkfs time. +.sp Valid sizes for version 1 and version 2 logs are 16384 (value=16k)
man/man5/xfs.5 controls the size of each buffer and so is also relevant to · line 260
Quoted 10 lines
man/man5/xfs.5 +3
-4and 32768 (value=32k). Valid sizes for version 2 logs also -include 65536 (value=64k), 131072 (value=128k) and 262144 (value=256k). The -logbsize must be an integer multiple of the log -stripe unit configured at mkfs time. +include 65536 (value=64k), 131072 (value=128k) and 262144 (value=256k). .sp The default value for version 1 logs is 32768, while the -default value for version 2 logs is max(32768, log_sunit). +default value for version 2 logs is max(32768, log_sunit) even if +log_sunit does not match one of the valid values above.
Weird, but as a documentation stopgap until someone figures out if there are any bad effects of non-power-of-2 logbsizes,
--D
Quoted 7 lines
man/man5/xfs.5 +0
-0.TP .BR logdev=device " and " rtdev=device Use an external log (metadata journal) and/or real-time device.Signature · 1 line
2.51.0
Quoted 56 lines · Darrick J. Wong
Quoted 42 lines · On Tue, Aug 26, 2025 at 02:23:12PM +0200, [email protected] wrote:
From: Carlos Maiolino <[email protected]>
Valid values for logbsize depends on whether
log_sunitis set on the filesystem or not and if logbsize is manually set or not.When manually set, logbsize must be one of the speficied values - 32k to 256k inclusive in power-of-to increments. And, the specified value must also be a multiple of
log_sunit.The default configuration for v2 logs uses a relaxed restriction, setting logbsize to
log_sunit, independent if it is one of the valid values or not - also implicitly ignoring the power of two restriction.Instead of changing valid possible values for logbsize, increasing the testing matrix and allowing users to use some dubious configuration, just update the man page to describe this difference in behavior when manually setting logbsize or leave it to defaults.
This has originally been found by an user attempting to manually set logbsize to the same value picked by the default configuration just so to receive an error message as result.
Signed-off-by Carlos Maiolino <[email protected]>--- man/man5/xfs.5 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)man/man5/xfs.5 +4
-1@@ -246,16 +246,18 @@ controls the size of each buffer and so is also relevant to this case. .TP .B logbsize=value -Set the size of each in-memory log buffer. The size may be +Set the size of each in-memory log buffer. The size may be specified in bytes, or in kibibytes (KiB) with a "k" suffix. +If set manually, logbsize must be one of the specified valid +sizes and a multiple of the log stripe unit - configured at mkfs time. +.sp Valid sizes for version 1 and version 2 logs are 16384 (value=16k)man/man5/xfs.5 controls the size of each buffer and so is also relevant to · line 260
Quoted 10 lines
man/man5/xfs.5 +3
-4and 32768 (value=32k). Valid sizes for version 2 logs also -include 65536 (value=64k), 131072 (value=128k) and 262144 (value=256k). The -logbsize must be an integer multiple of the log -stripe unit configured at mkfs time. +include 65536 (value=64k), 131072 (value=128k) and 262144 (value=256k). .sp The default value for version 1 logs is 32768, while the -default value for version 2 logs is max(32768, log_sunit). +default value for version 2 logs is max(32768, log_sunit) even if +log_sunit does not match one of the valid values above.Weird, but as a documentation stopgap until someone figures out if there are any bad effects of non-power-of-2 logbsizes,
Quoted 1 line
Reviewed-by "Darrick J. Wong" <[email protected]>
My point indeed :)
Quoted 11 lines
--D
Quoted 7 lines
man/man5/xfs.5 +0
-1.TP .BR logdev=device " and " rtdev=device Use an external log (metadata journal) and/or real-time device. --2.51.0