From: "Artem B. Bityuckiy" <dedekind@yandex.ru>
To: 419cf994+419d3f9e@tempmail.wgz.org, bwarden@wgz.com
Cc: linux-mtd@lists.infradead.org
Subject: Re: Determining actual flash usage of a particular file
Date: Fri, 19 Nov 2004 12:19:32 +0300 [thread overview]
Message-ID: <419DBAA4.4070207@yandex.ru> (raw)
In-Reply-To: <1100810691.31062.22.camel@weaponx.rchland.ibm.com>
jdub@us.ibm.com wrote:
> On Thu, 2004-11-18 at 14:15, 419cf994@tempmail.wgz.org wrote:
>
>>I've been reading through the archives for several days, so I hope I
>>haven't missed an answer somewhere.
>>
>>Is there a way to determine the actual flash space occupied by a
>>particular file on a JFFS2 partition? 'ls' and 'du' report number of
>>bytes of the content of the file, but of course compression and other
>>factors affect that greatly.
>>
>>My definition of actual space is flexible... could be number of blocks or
>>pages occupied, or something similar. I just need a metric that's more
>>closely related to storage space than uncompressed size.
>
>
> I don't know of a way to get this info on a running system. If you can
> pull the binary filesystem image off of the board you might be able to
> hack jffs2dump.c in the util directory to give you that info.
>
> Or maybe there are other ways that I don't know about.
>
> josh
You may write some fctl which does this. In the kernel space, it is very
easy to calculate th actual size of the file on flash (just go through
node_refs and summ the ref->totlen).
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
next prev parent reply other threads:[~2004-11-19 9:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-18 20:15 Determining actual flash usage of a particular file 419cf994
2004-11-18 20:44 ` Josh Boyer
2004-11-19 9:19 ` Artem B. Bityuckiy [this message]
2004-11-19 9:31 ` David Woodhouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=419DBAA4.4070207@yandex.ru \
--to=dedekind@yandex.ru \
--cc=419cf994+419d3f9e@tempmail.wgz.org \
--cc=bwarden@wgz.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox