lkml.org 
[lkml]   [2018]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject答复: 答复: 答复: 答复: [PATCH] ext4: e2fspro gs: fix inode bitmap num not integer,incompat ible for ancient android devices
Date
Yes, it is caused by using 1024 blocksize.
It is historical problem, and I have to admit that's not good idea. I don't know why somebody choose it some years before.
It has been corrected two years before or more early. But some ancient devices exist.
It is not user data, no need to do file-based encryption. It is a small partition for some use.

However, 1024 is legal though not good, somebody may use it.
And we should fix it.


Regards,
Ming

-----邮件原件-----
发件人: Theodore Y. Ts'o [mailto:tytso@mit.edu]
发送时间: 2018年6月29日 22:26
收件人: Gaoming (ming, consumer BG)
抄送: linux-ext4@vger.kernel.org; linux-kernel@vger.kernel.org; Liqingchao (sorp); Shenchen (harry); miaoxie (A); yangfei (D); Renlipeng (OS driver)
主题: Re: 答复: 答复: 答复: [PATCH] ext4: e2fsprogs: fix inode bitmap num not integer,incompatible for ancient android devices

On Fri, Jun 29, 2018 at 02:06:03AM +0000, Gaoming (ming, consumer BG) wrote:
> We use usual inode size, it is 256 bytes.
>
> Yes, this commit is in my repository.
> But there is a bug in this patch.
>
> Let me show you,
> Here is the bug: " return ALIGN(inodes, (info.block_size / info.inode_size));"
>
> In my reproduce,
> info.block_size = 1024, (it is legal)
> info.inode_size =256,

But why are you using a block size of 1024? It's legal, but in
general, it's a bad idea (often will hurt performance, will impose
additional scalability limitations, etc.).... It's certainly not
the default.

A block size of 1024 is also incompatible with file-based encryption
(FBE), which is required for a number of Android features. Support
for FBE is strongly required, and it wouldn't surprise me if it
becomes an mandatory requirement at some point in the future.

How long have you been using a block size of 1024, and why?

> But in real scenario, we should align by 8,( 8 bit per bytes in inode map).

Yes, and that's why mke2fs does. make_ext4fs was an Android specific
abomination, that I've been pushing hard for Android to rid itself of.
This is not the only thing it's gotten wrong in the past, and I've had
to help Android developers deal with data corrupting bugs caused by
the fact that way back when, Android had a GPL-in-userspace allergy.

- Ted
\
 
 \ /
  Last update: 2018-06-30 03:27    [W:0.175 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site