Actual usage of files in ubifs

Richard Weinberger richard.weinberger at gmail.com
Mon Sep 11 07:55:05 PDT 2017


On Mon, Sep 11, 2017 at 11:47 AM, Ricard Wanderlof
<ricard.wanderlof at axis.com> wrote:
>
> Is there a (simple) way to find out exactly how much space each specific
> file uses in an ubifs fils system?
>
> I looked into running mkfs.ubifs with some form of option to give me the
> info, the closest I got was -g 3 which output a lot of sizes but it was
> not obvious exactly what they meant.
>
> I suppose it would be fully possible to add code to mkfs.ubifs to output
> this information, as it surely must be there at some point, since it
> selects the compression algorithm on a file per file basis, debending on
> the amount of compression acheived for each algorithm.

Well, how exactly should it be?
I guess you want more than the compressed size on flash.
Do you also want to know how much bytes a file occupies in the index
tree and the inode itself?
This is non-trivial.

-- 
Thanks,
//richard



More information about the linux-mtd mailing list