[U-Boot] [PATCH] fs/ext4: caculate log2blksz from blksz, other its value = 0

Albert ARIBAUD albert.u.boot at aribaud.net
Thu Jun 27 12:17:25 CEST 2013


Hi Lan,

On Thu, 27 Jun 2013 17:42:31 +0800, "Lan Yixun (dlan)"
<dennis.yxun at gmail.com> wrote:

> From: "Lan Yixun (dlan)" <dennis.yxun at gmail.com>
> 
> err:
> lt703a # ext4ls nand 3:0
> Failed to mount ext2 filesystem...
> ** Unrecognized filesystem type **
> 
> bug may introduced by commit:
> 
> commit 50ce4c07df1c98aabf4630b35152ed95a87242f7
> Author: Egbert Eich <eich at suse.com>
> Date:   Wed May 1 01:13:19 2013 +0000
> 
>     fs/ext4: Support device block sizes != 512 bytes

Please make the commit summary a description of what is wrong and how
it is fixed, and move the context (how the bug was found, console
output, etc) after the commit message separator '---' below.

Also, fix probably typo in the commit summary (first commit message
line) ("other" for "otherwise").

> Signed-off-by: Lan Yixun (dlan) <dennis.yxun at gmail.com>
> ---
>  disk/part.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/disk/part.c b/disk/part.c
> index fc8404d..dbc94c4 100644
> --- a/disk/part.c
> +++ b/disk/part.c
> @@ -551,6 +551,8 @@ int get_device_and_partition(const char *ifname, const char *dev_part_str,
>  			goto cleanup;
>  		}
>  
> +		(*dev_desc)->log2blksz = LOG2((*dev_desc)->blksz);
> +
>  		info->start = 0;
>  		info->size = (*dev_desc)->lba;
>  		info->blksz = (*dev_desc)->blksz;
> @@ -634,6 +636,8 @@ int get_device_and_partition(const char *ifname, const char *dev_part_str,
>  		goto cleanup;
>  	}
>  
> +	(*dev_desc)->log2blksz = LOG2((*dev_desc)->blksz);
> +
>  	ret = part;
>  	goto cleanup;
>  


Amicalement,
-- 
Albert.


More information about the U-Boot mailing list