[PATCH][MTD-UTILS] Set mkfs.jffs2 page size runtime instead of fixed [respoin]
Josh Boyer
jwboyer at gmail.com
Thu Dec 20 10:43:04 EST 2007
On Thu, 20 Dec 2007 12:46:38 +0100 (CET)
Ricard Wanderlof <ricard.wanderlof at axis.com> wrote:
>
> On Fri, 7 Dec 2007, Josh Boyer wrote:
>
> > On Thu, 6 Dec 2007 12:43:47 +0100 (CET)
> > Ricard Wanderlof <ricard.wanderlof at axis.com> 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 think I see what you mean. I had inadvertently put the setting
> of the page_size variable at the start of write_regular_file() instead of
> at the start of main() where I wanted it. Fixed.
>
> > 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.
>
> Ok, good point, something like this then:
Looks good. Applied.
josh
More information about the linux-mtd
mailing list