* inode alignment in flash
@ 2000-07-10 18:33 Rogelio M. Serrano Jr.
2000-07-12 7:16 ` Finn Hakansson
0 siblings, 1 reply; 3+ messages in thread
From: Rogelio M. Serrano Jr. @ 2000-07-10 18:33 UTC (permalink / raw)
To: mtd
How should the inodes magic number be aligned in flash? On page
boundaries? I have been using mkfs.jffs to create a jffs images. But
after mounting it successfully after thrashing some chunks, it wont
mount the second time i try. I notice that some chunks are discarded as
having invalid checksums and that results in severely reduced file
sizes. When I went over the sources, I keep on seeing blocks being
referred to in the switch construct inside jffs_scan_flash. Magic
numbers are then aligned on block boundaries?
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: inode alignment in flash
2000-07-10 18:33 inode alignment in flash Rogelio M. Serrano Jr.
@ 2000-07-12 7:16 ` Finn Hakansson
2000-07-12 18:04 ` Rogelio M. Serrano Jr.
0 siblings, 1 reply; 3+ messages in thread
From: Finn Hakansson @ 2000-07-12 7:16 UTC (permalink / raw)
To: Rogelio M. Serrano Jr.; +Cc: mtd, jffs-dev
On Tue, 11 Jul 2000, Rogelio M. Serrano Jr. wrote:
> How should the inodes magic number be aligned in flash? On page
> boundaries? I have been using mkfs.jffs to create a jffs images. But
> after mounting it successfully after thrashing some chunks, it wont
> mount the second time i try. I notice that some chunks are discarded as
> having invalid checksums and that results in severely reduced file
> sizes. When I went over the sources, I keep on seeing blocks being
> referred to in the switch construct inside jffs_scan_flash. Magic
> numbers are then aligned on block boundaries?
No, raw inodes in JFFS is not aligned on page boundaries. There
is a definition in jffs_fm.h called JFFS_ALIGN_SIZE which is the
alignment of all kinds of data on-flash. Currently JFFS_ALIGN_SIZE
is set to 4 bytes. (The comments in the switch in jffs_scan_flash
about blocks are a little obsolete. Sorry about that.)
Did I get this right? You first create a jffs image with mkfs.jffs
which you are able to mount the first time. Then you write some more
data to the flash device, while mounted, and everything is fine. When
you then mount after doing these writes, it fails. Exactly where does
the mount fail? Hmmm... Can you turn on the debug printouts and try
to see what is going wrong?
Best regards,
Finn
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: inode alignment in flash
2000-07-12 7:16 ` Finn Hakansson
@ 2000-07-12 18:04 ` Rogelio M. Serrano Jr.
0 siblings, 0 replies; 3+ messages in thread
From: Rogelio M. Serrano Jr. @ 2000-07-12 18:04 UTC (permalink / raw)
To: Finn Hakansson; +Cc: mtd
Finn Hakansson wrote:
>
> No, raw inodes in JFFS is not aligned on page boundaries. There
> is a definition in jffs_fm.h called JFFS_ALIGN_SIZE which is the
> alignment of all kinds of data on-flash. Currently JFFS_ALIGN_SIZE
> is set to 4 bytes. (The comments in the switch in jffs_scan_flash
> about blocks are a little obsolete. Sorry about that.)
>
I have already noticed that macro before but I had doubts when I came across
the comments when I dived deep into the code.
>
> Did I get this right? You first create a jffs image with mkfs.jffs
> which you are able to mount the first time. Then you write some more
> data to the flash device, while mounted, and everything is fine. When
> you then mount after doing these writes, it fails. Exactly where does
> the mount fail? Hmmm... Can you turn on the debug printouts and try
> to see what is going wrong?
>
> Best regards,
> Finn
Not quiet. I created a jffs image by using cat. When I mounted it the first
time I noticed that some inodes were already being discarded as invlaid . I
didnt write anything to it. After a long time and a lot of messages about
invalid checksums it successfuly mounts. I cd into the mounted fs and did an
"ls -l" in the directory. The file size for one file was wrong. It was the
file with the "invalid" inodes. When I unmount and then mount again it
simply fails.
Now I looked at the sources and noticed the patch about byteorder.... I
applied it and recompiled the kernel and now I can mount with no problems. I
cant write on it though, it just fails. I commented out the part that
restricts write to 512 and all but still it wont write. I will try turning
on debug and post a copy the output.
Thanks.
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-07-12 13:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-07-10 18:33 inode alignment in flash Rogelio M. Serrano Jr.
2000-07-12 7:16 ` Finn Hakansson
2000-07-12 18:04 ` Rogelio M. Serrano Jr.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox