Hi all,
 
I found a problem, that pops up when not all partitions of
a volume are mounted at startup.
I'm using Yaffs2 with the direct interface.
 
I have a small partition "/sys", which contains a single file "test.txt"
and a large partition "/flash", which containts a single file "log.txt"
 
A) if I do the following things, all behaves as expected:
 
- mount "/sys"
- mount "/flash"
- opendir on "/sys"
- readdir until no more files are found, I get this directory listing
 
Directory of /sys:
  'text.txt'
  'lost+found'
 
- opendir on "/flash"
- readdir until no more files are found, I get this directory listing
 
Directory of /flash:
  'log.txt'
  'lost+found'
 
B) but if I do these things below, I get odd results
 
- mount "/sys"
- opendir on "/sys"
- readdir until no more files are found, I get this directory listing
 
Directory of /sys:
  'text.txt'
  'log.txt'
  'lost+found'
 
- mount "/flash"
- opendir on "/flash"
- readdir until no more files are found, I get this directory listing
 
Directory of /flash:
  'log.txt'
  'test.txt'
  'lost+found'
 
In other words, I see the file "log.txt" from partition "/flash" also in
partition "/sys" and vice versa with the file "test.txt".
 
I even get no error if I unlink the (actually non-existing) file
"/flash/test.txt".
 
Is there anything I can do about that (other than mounting all
partitions right at startup)? I want to mount the large partition later,
because after a power-failure (which is very common in our
environment) mounting takes 10 seconds, which is too long.
 
If there's no other solution: Is it possible to create two instances
of Yaffs (we would take care about making the NAND-interface
thread safe on our own), or does Yaffs use any globals, which would
make this impossible?
 
Thanks for any help!
Regards,
Gerhard