[PATCH][MTD-UTILS] Set mkfs.jffs2 page size runtime instead of fixed.

Ricard Wanderlof ricard.wanderlof at axis.com
Mon Dec 10 15:00:25 EST 2007

On Fri, 7 Dec 2007, Josh Boyer wrote:

>> This patch reads the default PAGE_SIZE from sysconf(), i.e. the system
>> mkfs.jffs2 is running on, instead of just setting it to 4096 (which of
>> course is valid for most systems but not all).
> This makes sense overall.  I'd like to do it a slightly different way
> though.

I'm open to suggestions. Care to elaborate on that?

> Could we add an additional check here to see if page_size != 4096, and
> print a loud warning with the page size that is actually being used and
> suggest the --pagesize option if that isn't what is desired?
> It's not that we have tons of systems using a page size different than
> 4KiB, but it's a change in behavior for those that do and I'd like to
> at least warn users about it.  Otherwise the patch looks fine.

I guess you are considering the case of making a file system on a host 
with a page size of != 4096 for a target system with 4096 byte pages. Good 
point, I hadn't thought of that.

I was very much into the 'my host is x86 and my target is something else' 
train of though; in this case it wouldn't be much of a problem, as the 
user would be supplying a --pagesize anyway to get the correct page size 
for the target.

I'll get back with a new patch as soon as possible.

Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30

More information about the linux-mtd mailing list