* Determining actual flash usage of a particular file
@ 2004-11-18 20:15 419cf994
2004-11-18 20:44 ` Josh Boyer
0 siblings, 1 reply; 4+ messages in thread
From: 419cf994 @ 2004-11-18 20:15 UTC (permalink / raw)
To: linux-mtd
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Determining actual flash usage of a particular file
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
0 siblings, 1 reply; 4+ messages in thread
From: Josh Boyer @ 2004-11-18 20:44 UTC (permalink / raw)
To: 419cf994; +Cc: linux-mtd
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Determining actual flash usage of a particular file
2004-11-18 20:44 ` Josh Boyer
@ 2004-11-19 9:19 ` Artem B. Bityuckiy
2004-11-19 9:31 ` David Woodhouse
0 siblings, 1 reply; 4+ messages in thread
From: Artem B. Bityuckiy @ 2004-11-19 9:19 UTC (permalink / raw)
To: 419cf994+419d3f9e, bwarden; +Cc: linux-mtd
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Determining actual flash usage of a particular file
2004-11-19 9:19 ` Artem B. Bityuckiy
@ 2004-11-19 9:31 ` David Woodhouse
0 siblings, 0 replies; 4+ messages in thread
From: David Woodhouse @ 2004-11-19 9:31 UTC (permalink / raw)
To: Artem B. Bityuckiy; +Cc: linux-mtd
On Fri, 2004-11-19 at 12:19 +0300, Artem B. Bityuckiy wrote:
> 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).
...of the non-obsolete nodes.
--
dwmw2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-11-19 9:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2004-11-19 9:31 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox