[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
> What happens when you have multiple partitions with one of them a mtd
> raw partition and you accidentally mount the raw partition? Erase the
> raw partition and format for jffs, destroying all data in the raw
> When mounting a partition with jffs, if the partition isn't
> completely erased or the partition isn't formatted for jffs, fail the
> mount. Isn't this what happens when you mount a drive formatted as
> type 'a' as type 'b'? Doesn't the mount fail with a "wrong fs type"?
If we fail the mount when detecting that even one eraseblock isn't
preformatted, we are going to break embedded units which are power cycled
in normal operation. While it's useful to put in a safeguard for people
doing silly things like trying to mount the whole chip, it cannot be done
at the cost of breaking things for other people.
Note that the particular example you give can't happen easily because the
MTD partitioning code won't allow you to do overlapping partitions.
Yes - it's a good idea, so if you can provide a more comprehensive method
for deciding when to fail (or possibly force a readonly mount is better),
I'm more than happy to accept it.
One other possibility I've been considering is putting the offending blocks
on the bad_list and having an interface for userspace to tell JFFS2 to
attempt to erase and reclaim blocks from the bad_list. And devices in the
field could do this automatically at boot time, for blocks which are merely
unclean rather than which actually contain BADBLOCK markers.
Oh yeah - I didn't implement BADBLOCK markers yet. Minor detail :)
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to firstname.lastname@example.org