ext2_lookup() and i_count
Quoted 9 lines · David Woodhouse
Quoted 3 lines · [email protected] said:
Btw, is there any document indicating how to use the mtdram.o module
? Now I can insert every module without a glitch, including jffs, and I'm ready for testing!You load it and it behaves just like a normal flash device. You presumably stick an empty JFFS filesystem on it with something like '
jffs_format/dev/mtd0', then 'mount/dev/mtdblock0/mnt/jffs-tjffs'
Almost.
First create your to be filesystem in a directory (call it e.g. img_dir), then run "mkfs.jffs img_dir > fs.jffs", this creates an image fs.jffs that you can copy to your flash (in the case of an mtdram flash, just do "cat fs.jffs > /dev/mtd0". Then mount the flash "mount -t jffs /dev/mtdblock0 /mnt/jffs".
Then just go to /mnt/jffs and play around with the filesystem. Not everything works well right now, rename isn't implemented, and unlink seems to have some problems.
Also note that the default size of the mtdram device is 2 meg, if you want a different size you have to change a define in the mtdram.c code.
/ Alex
To unsubscribe, send "unsubscribe mtd" to [email protected]
Quoted 5 lines · Alexander Larsson
First create your to be filesystem in a directory (call it e.g.
img_dir), then run "mkfs.jffsimg_dir> fs.jffs", this creates an image fs.jffs that you can copy to your flash (in the case of an mtdram flash, just do "cat fs.jffs >/dev/mtd0". Then mount the flash "mount -t jffs/dev/mtdblock0/mnt/jffs".
How can I create these devices?? MAKEDEV doesn't know about them and mknod needs major/minor numbers that aren't mentionned anywhere...
./MAKEDEV: don't know what "mtd" is
--
Sébastien Côté
To unsubscribe, send "unsubscribe mtd" to [email protected]
Quoted 8 lines · Sébastien Côté
Quoted 5 lines · Alexander Larsson
First create your to be filesystem in a directory (call it e.g.
img_dir), then run "mkfs.jffsimg_dir> fs.jffs", this creates an image fs.jffs that you can copy to your flash (in the case of an mtdram flash, just do "cat fs.jffs >/dev/mtd0". Then mount the flash "mount -t jffs/dev/mtdblock0/mnt/jffs".
Quoted 4 lines
How can I create these devices?? MAKEDEV doesn't know about them and mknod needs major/minor numbers that aren't mentionned anywhere...
./MAKEDEV: don't know what "mtd" is
There is a MAKEDEV script in the utils dir that creates them.
/ Alex
To unsubscribe, send "unsubscribe mtd" to [email protected]
Quoted 10 lines · Alexander Larsson
Quoted 1 line · David Woodhouse
First create your to be filesystem in a directory (call it e.g.
img_dir), then run "mkfs.jffsimg_dir> fs.jffs", this creates an image fs.jffs that you can copy to your flash (in the case of an mtdram flash, just do "cat fs.jffs >/dev/mtd0". Then mount the flash "mount -t jffs/dev/mtdblock0/mnt/jffs".
Quoted 3 lines
Then just go to
/mnt/jffsand play around with the filesystem. Not everything works well right now, rename isn't implemented, and unlink seems to have some problems.
I tried this out today and encoutered some problems. Most file operations work well (cp, rm ln -s) but I have two problems.
First, big file don't get mounted on the filesystem (by big I mean a few hundred Ks). I tried to track the problem without luck. Second, the command df always reports dans the device is full. Since jffs_scan_flash()'s reports are ok, I'm wondering where df takes the informations from?
Did you run into similar problems?
Thanks,
Signature · 4 lines
Sébastien Côté To unsubscribe, send "unsubscribe mtd" to [email protected]
Quoted 11 lines · Sébastien Côté
Quoted 10 lines · Alexander Larsson
Quoted 1 line · David Woodhouse
First create your to be filesystem in a directory (call it e.g.
img_dir), then run "mkfs.jffsimg_dir> fs.jffs", this creates an image fs.jffs that you can copy to your flash (in the case of an mtdram flash, just do "cat fs.jffs >/dev/mtd0". Then mount the flash "mount -t jffs/dev/mtdblock0/mnt/jffs".
Quoted 6 lines
Quoted 3 lines
Then just go to
/mnt/jffsand play around with the filesystem. Not everything works well right now, rename isn't implemented, and unlink seems to have some problems.I tried this out today and encoutered some problems. Most file operations work well (cp, rm ln -s) but I have two problems.
I have huge problems with rm (unlink). If i unlink a file i've recently read i get a BUG() in clear_inode() in fs/inode.c. See my posting to linux-kernel for more info.
Otherwise i haven't done much testing, I've mainly done separate testing of each function as I've implemented them.
Quoted 7 lines
First, big file don't get mounted on the filesystem (by big I mean a few hundred Ks). I tried to track the problem without luck. Second, the command df always reports dans the device is full. Since jffs_scan_flash()'s reports are ok, I'm wondering where df takes the informations from?
Did you run into similar problems?
I haven't tried any big filesystems yet.
df probably uses jffs_statfs() (the statfs system call) to get its info. I haven't tested this yet.
/ Alex
To unsubscribe, send "unsubscribe mtd" to [email protected]
Quoted 6 lines · Alexander Larsson
I have huge problems with rm (unlink). If i unlink a file i've recently read i get a
BUG()inclear_inode()infs/inode.c. See my posting to linux-kernel for more info.
Otherwise i haven't done much testing, I've mainly done separate testing of each function as I've implemented them.
I tried to unlink a file after reading it and, even though the file gets unlinked without any error, most of the files on the filesystem got screwed up.
In kernel 2.2.14, clear_inode() is a bit different :
void clear_inode(struct inode *inode)
{
if (inode->i_nr_pages)
truncate_inode_pages(inode,0);
wait_on_inode(inode);
...
}This would explain the fact that I didn't get any BUG().
Signature · 4 lines
Sébastien Côté To unsubscribe, send "unsubscribe mtd" to [email protected]
Quoted 5 lines · Alexander Larsson
I have huge problems with rm (unlink). If i unlink a file i've recently read i get a
BUG()inclear_inode()infs/inode.c. See my posting to linux-kernel for more info.
Otherwise i haven't done much testing, I've mainly done separate testing of each function as I've implemented them.
I played with the filesystem today and I noticed that this problem went away if I erase every file on the filesystem and re-copy them once it is mounted. I tried that a few times and all my problems went away (unlink seems to work fine, df reports are ok, and so on). I'm starting to think that the problem might lie elsewhere.
Could mkfs.jffs be the problem ? What about mtd ?
Signature · 4 lines
Sébastien Côté To unsubscribe, send "unsubscribe mtd" to [email protected]
Quoted 8 lines · Sébastien Côté
Quoted 5 lines · Alexander Larsson
I have huge problems with rm (unlink). If i unlink a file i've recently read i get a
BUG()inclear_inode()infs/inode.c. See my posting to linux-kernel for more info.
Otherwise i haven't done much testing, I've mainly done separate testing of each function as I've implemented them.
Quoted 5 lines
I played with the filesystem today and I noticed that this problem went away if I erase every file on the filesystem and re-copy them once it is mounted. I tried that a few times and all my problems went away (unlink seems to work fine, df reports are ok, and so on). I'm starting to think that the problem might lie elsewhere.
The problem was that i had no delete_inode() op in the superblock_operations, so iput didn't call truncate_inode_pages() if there were any cached pages.
/ Alex
To unsubscribe, send "unsubscribe mtd" to [email protected]