Actual usage of files in ubifs
Ricard Wanderlof
ricard.wanderlof at axis.com
Mon Sep 11 08:18:52 PDT 2017
On Mon, 11 Sep 2017, Richard Weinberger wrote:
> 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.
Good point. I was solely thinking along the lines of how much space the
actual file occupied, not considering metadata. That would be a good
starting point. I'm guessing that for moderate file sizes the metadata
would be relatively small compared to the file itself?
/Ricard
--
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