From: Ashok M Padmanaban <ashokmp@sasken.com>
To: MTD for Linux <linux-mtd@lists.infradead.org>, navin.boppuri@newisys.com
Subject: RE: Weird status information on JFFS2 File System
Date: Fri, 15 Feb 2002 09:49:49 +0000 [thread overview]
Message-ID: <3C6CD9BD.7386D3F2@sasken.com> (raw)
Hi Navin
Your Jffs2 file system size is 1MB
Jffs2 reserves around 5 sectors( erase sectors) for garbage collection.
So even when ur FS is empty , command df will show that 5 erase sectors
have been already occupied
Regards
ashok
Navin Boppuri wrote:
> Well, I guess I think I know what the problem is. I should not use
/dev/zero to create files to test the file system size. I decided to use
/dev/core instead and that actually creates the correct sized file.
>
> But I still dont understand why the status of my file system is so
screwed up. Even with an empty file sytem, it shows 64% used. And I am
only able to write around 375K of data into this partition, which is
actually 1MB.
>
> Navin.
>
> -----Original Message-----
> From: Navin Boppuri
> Sent: Thursday, February 14, 2002 1:29 PM
> To: linux-mtd@lists.infradead.org
> Subject: Weird status information on JFFS2 File System
>
> Hello all,
>
> I have a JFFS2 file system successfully installed on my flash device.
Here is the output of the drivers during the Linux kernel boot. I have
1MB of flash partition installed as my flash device( I have two 16bit
AMD flash devices connected on a 32 bit bus as one device).
>
> sp flash device: 1000000 at 40000000
> Amd/Fujitsu Extended Query Table v1.1 at 0x0040
> number of CFI chips: 1
> Creating 1 MTD partitions on "Service Processor flash device":
> 0x00f00000-0x01000000 : "Flash file system"
> mtd: Giving out device 0 to Flash file system
>
> After I mount my file system using the following command,
> mount -t jffs2 /dev/mtdblock0 /mnt/jffs2
>
> I confirm that the file system is mounted by looking at /proc/mounts.
>
> root@sp_06:/mnt/jffs2# cat /proc/mounts
> /dev/root / nfs
rw,v2,rsize=4096,wsize=4096,hard,udp,nolock,addr=10.10.30.39 0 0
> proc /proc proc rw 0 0
> devpts /dev/pts devpts rw 0 0
> /dev/mtdblock0 /mnt/jffs2 jffs2 rw 0 0
>
> I now look at the disk usage using the df command
>
> root@sp_06:/mnt/jffs2# df
> Filesystem 1k-blocks Used Available Use%
Mounted on
> /dev/root 30237928 12751536 15950380 45% /
> /dev/mtdblock0 1024 644 380 63%
/mnt/jffs2
>
> root@sp_06:/mnt/jffs2# ls -al
> total 4
> drwxr-xr-x 1 root root 0 Jan 1 00:00 .
> drwxr-xr-x 3 1342 root 4096 Jan 25 2002 ..
>
> I am surprised to see 63% usage without anything in the file system.
>
> I now create the following three files doing this:
>
> dd if=/dev/zero of=tmp.out bs=1M count=4 conv=sync
> dd if=/dev/zero of=tmp2.out bs=1M count=4 conv=sync
> dd if=/dev/zero of=tmp3.out bs=1M count=4 conv=sync
>
> I run out of space while trying to create the tmp3.out command. But I
am able to create almost 10MB of data in my 1MB file system.
>
> root@sp_06:~# ls -al /mnt/jffs2
> total 10152
> drwxr-xr-x 1 root root 0 Jan 1 00:00 .
> drwxr-xr-x 3 1342 root 4096 Jan 25 2002 ..
> -rw-r--r-- 1 root root 4194304 Jan 1 03:01
tmp.out
> -rw-r--r-- 1 root root 4194304 Jan 1 03:01
tmp2.out
> -rw-r--r-- 1 root root 2002944 Jan 1 03:01
tmp3.out
>
> root@sp_06:~# df
> Filesystem 1k-blocks Used Available Use%
Mounted on
> /dev/root 30237928 12751536 15950380 45% /
> /dev/mtdblock0 1024 932 92 92%
/mnt/jffs2
>
> I doing something really wrong here. What's going on? The kernel
messages are all correct. Then how am I able to access 10MB of flash in
this file system? I am only mapping the last 1MB of flash which is 16MB
in size. And I am confused about the status of my file system each time
I create files.
>
> Can someone give me some pointers on this? Thank you.
>
> Navin.
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
next reply other threads:[~2002-02-15 4:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-15 9:49 Ashok M Padmanaban [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-02-15 16:45 Weird status information on JFFS2 File System Navin Boppuri
2002-02-15 16:06 Navin Boppuri
2002-02-15 16:10 ` David Woodhouse
[not found] <D3A72C5007329A4F991C0DD87202259F096A6F@sekhmet.ad.newisys. com>
2002-02-15 5:21 ` Chris Vagnini
2002-02-14 22:26 Navin Boppuri
2002-02-14 20:57 Navin Boppuri
2002-02-14 19:29 Navin Boppuri
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=3C6CD9BD.7386D3F2@sasken.com \
--to=ashokmp@sasken.com \
--cc=linux-mtd@lists.infradead.org \
--cc=navin.boppuri@newisys.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.