diff mbox series

[1/1] fs/ubifs: increase logical eraseblock size

Message ID 20230708163644.710352-1-bernd@kuhls.net
State Rejected
Headers show
Series [1/1] fs/ubifs: increase logical eraseblock size | expand

Commit Message

Bernd Kuhls July 8, 2023, 4:36 p.m. UTC
This value is unchanged since 2008 and too small for current images.

Fixes:
http://autobuild.buildroot.net/results/f72/f72918d63510b170e5da01bfa9c247cf9dcf507f/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
There is no particular reason for the new value, it was just the first
value I found working for this defconfig while increasing it in steps
of 0x10000.

 fs/ubifs/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Petazzoni July 10, 2023, 5:26 p.m. UTC | #1
On Sat,  8 Jul 2023 18:36:44 +0200
Bernd Kuhls <bernd@kuhls.net> wrote:

> This value is unchanged since 2008 and too small for current images.
> 
> Fixes:
> http://autobuild.buildroot.net/results/f72/f72918d63510b170e5da01bfa9c247cf9dcf507f/
> 
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> ---
> There is no particular reason for the new value, it was just the first
> value I found working for this defconfig while increasing it in steps
> of 0x10000.
> 
>  fs/ubifs/Config.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ubifs/Config.in b/fs/ubifs/Config.in
> index e79ab9a17e..bad26bf99f 100644
> --- a/fs/ubifs/Config.in
> +++ b/fs/ubifs/Config.in
> @@ -7,7 +7,7 @@ if BR2_TARGET_ROOTFS_UBIFS
>  
>  config BR2_TARGET_ROOTFS_UBIFS_LEBSIZE
>  	hex "logical eraseblock size"
> -	default 0x1f800
> +	default 0x3f800

This doesn't make sense, and in fact doesn't really solve the issue at
http://autobuild.buildroot.net/results/f72/f72918d63510b170e5da01bfa9c247cf9dcf507f/build-end.log.

The issue at
http://autobuild.buildroot.net/results/f72/f72918d63510b170e5da01bfa9c247cf9dcf507f/build-end.log
is that the *number* of LEBs in insufficient, i.e the size of the image
is too small to contain the root filesystem contents.

What your patch is doing is changing the size of the LEB, but the size
of the LEB is intimately related to the NAND flash geometry. You can't
just change it randomly. So yes, by extending the LEB size, you're less
likely to encounter the "max_leb_cnt too low" error because with a
larger LEB size, you have more space for a given number of LEBs, but
you're not fixing the real issue, which is bound to happen again with a
larger root filesystem.

Best regards,

Thomas
diff mbox series

Patch

diff --git a/fs/ubifs/Config.in b/fs/ubifs/Config.in
index e79ab9a17e..bad26bf99f 100644
--- a/fs/ubifs/Config.in
+++ b/fs/ubifs/Config.in
@@ -7,7 +7,7 @@  if BR2_TARGET_ROOTFS_UBIFS
 
 config BR2_TARGET_ROOTFS_UBIFS_LEBSIZE
 	hex "logical eraseblock size"
-	default 0x1f800
+	default 0x3f800
 	help
 	  Logical eraseblock (LEB) size. The value provided here is
 	  passed to the -e/--leb-size option of mkfs.ubifs.