[PATCH] mkfs.ubifs: support --squash-uids

Artem Bityutskiy dedekind at infradead.org
Tue May 6 06:23:12 EDT 2008


On Tue, 2008-05-06 at 19:46 +1000, Hamish Moffatt wrote:
> Yes it was against the v0.4 tag. 
> 
> mkfs.jffs2 and genext2fs both use -P as the short version of
> --squash-perms, so mkfs.ubifs will have to use something different. No
> big deal however (although they are pretty similar otherwise).

Hmm, ok, then I will make it -p back. I just wanted to reserve -p for
other purposes, but this is not important anymore. I'v pushed
corresponding patch.

> Also, what is the purpose of --max-leb-cnt? It seems to be just a safety
> check that the volume will fit? It's a bit unusual.

It is a form of specifying FS size. But instead of specifying exact FS
size, you specify maximum FS size. This means that it will be possible
to put the image on smaller volumes as well, which is quite handy
because due to random amount of initial NAND bad blocks different
instances of the same device may have a bit different volume sizes.
E.g., rootfs partition may be 500MiB or 501MiB on a 512MiB NAND,
depending on how many initial bad block NAND contains.

Fundamentally, mkfs.ubifs has to know FS size because UBIFS maintains
and stores per-LEB information (like amount of dirty and free space in
each LEB) in so-called LPT area on the media. So obviously, the size of
this area depends on the total amount of LEBs, i.e. on the volume size.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list