* Re: ext2_lookup() and i_count [not found] <30252.958050596@devel2.axiom.internal> @ 2000-05-11 14:16 ` Alexander Larsson 2000-05-11 14:28 ` Sébastien Côté 2000-05-12 19:15 ` Sébastien Côté 0 siblings, 2 replies; 8+ messages in thread From: Alexander Larsson @ 2000-05-11 14:16 UTC (permalink / raw) To: Sébastien Côté; +Cc: mtd, dwmw2 On Thu, 11 May 2000, David Woodhouse wrote: > > scote1@Matrox.COM 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 majordomo@infradead.org ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: ext2_lookup() and i_count 2000-05-11 14:16 ` ext2_lookup() and i_count Alexander Larsson @ 2000-05-11 14:28 ` Sébastien Côté 2000-05-11 14:57 ` Alexander Larsson 2000-05-12 19:15 ` Sébastien Côté 1 sibling, 1 reply; 8+ messages in thread From: Sébastien Côté @ 2000-05-11 14:28 UTC (permalink / raw) To: mtd Alexander Larsson wrote : > 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". 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 majordomo@infradead.org ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: ext2_lookup() and i_count 2000-05-11 14:28 ` Sébastien Côté @ 2000-05-11 14:57 ` Alexander Larsson 0 siblings, 0 replies; 8+ messages in thread From: Alexander Larsson @ 2000-05-11 14:57 UTC (permalink / raw) To: Sébastien Côté; +Cc: mtd On Thu, 11 May 2000, Sébastien Côté wrote: > Alexander Larsson wrote : > > > 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". > > 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 majordomo@infradead.org ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: ext2_lookup() and i_count 2000-05-11 14:16 ` ext2_lookup() and i_count Alexander Larsson 2000-05-11 14:28 ` Sébastien Côté @ 2000-05-12 19:15 ` Sébastien Côté 2000-05-15 10:04 ` Alexander Larsson 1 sibling, 1 reply; 8+ messages in thread From: Sébastien Côté @ 2000-05-12 19:15 UTC (permalink / raw) To: Alexander Larsson; +Cc: mtd Alexander Larsson a écrit : > > On Thu, 11 May 2000, David Woodhouse wrote: > > > > 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. 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, -- Sébastien Côté To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: ext2_lookup() and i_count 2000-05-12 19:15 ` Sébastien Côté @ 2000-05-15 10:04 ` Alexander Larsson 2000-05-15 13:28 ` Sébastien Côté 2000-05-16 20:36 ` Sébastien Côté 0 siblings, 2 replies; 8+ messages in thread From: Alexander Larsson @ 2000-05-15 10:04 UTC (permalink / raw) To: Sébastien Côté; +Cc: mtd On Fri, 12 May 2000, Sébastien Côté wrote: > Alexander Larsson a écrit : > > > > On Thu, 11 May 2000, David Woodhouse wrote: > > > > > > > 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. > > 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. > 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 majordomo@infradead.org ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: ext2_lookup() and i_count 2000-05-15 10:04 ` Alexander Larsson @ 2000-05-15 13:28 ` Sébastien Côté 2000-05-16 20:36 ` Sébastien Côté 1 sibling, 0 replies; 8+ messages in thread From: Sébastien Côté @ 2000-05-15 13:28 UTC (permalink / raw) To: Alexander Larsson; +Cc: mtd Alexander Larsson wrote : > > 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. 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(). -- Sébastien Côté To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: ext2_lookup() and i_count 2000-05-15 10:04 ` Alexander Larsson 2000-05-15 13:28 ` Sébastien Côté @ 2000-05-16 20:36 ` Sébastien Côté 2000-05-19 13:05 ` Alexander Larsson 1 sibling, 1 reply; 8+ messages in thread From: Sébastien Côté @ 2000-05-16 20:36 UTC (permalink / raw) To: Alexander Larsson; +Cc: mtd Alexander Larsson wrote : > 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. 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 ? -- Sébastien Côté To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: ext2_lookup() and i_count 2000-05-16 20:36 ` Sébastien Côté @ 2000-05-19 13:05 ` Alexander Larsson 0 siblings, 0 replies; 8+ messages in thread From: Alexander Larsson @ 2000-05-19 13:05 UTC (permalink / raw) To: Sébastien Côté; +Cc: mtd On Tue, 16 May 2000, Sébastien Côté wrote: > Alexander Larsson wrote : > > > 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. > > 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 majordomo@infradead.org ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2000-05-19 13:06 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <30252.958050596@devel2.axiom.internal>
2000-05-11 14:16 ` ext2_lookup() and i_count Alexander Larsson
2000-05-11 14:28 ` Sébastien Côté
2000-05-11 14:57 ` Alexander Larsson
2000-05-12 19:15 ` Sébastien Côté
2000-05-15 10:04 ` Alexander Larsson
2000-05-15 13:28 ` Sébastien Côté
2000-05-16 20:36 ` Sébastien Côté
2000-05-19 13:05 ` Alexander Larsson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox