[Yaffs] mount failure

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Chris David
Date:  
To: yaffs
Subject: [Yaffs] mount failure
Hello,

Here is the failure message I was getting:

# mount -n -t yaffs2 /dev/mtdblock6 /mnt/nand_var
mount: wrong fs type, bad option, bad superblock on /var/run/mtdblock/var,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so


So, I perused the yaffs2 code, and stumbled upon this:

yaffs_guts.c:6718
                    case YAFFS_OBJECT_TYPE_SYMLINK:
                        if (oh) {
                            in->variant.symLinkVariant.alias =
                                yaffs_CloneString(oh->alias);
                            if (!in->variant.symLinkVariant.alias)
                                alloc_failed = 1;
                        }
                        break;
                    }



What I noticed is that oh->alias happens to be an empty string, thus
yaffs_CloneString returns NULL, and alloc_failed gets set. So, I
coded around this case, and now the mount succeeds.

This happens very, very rarely. But we believe we have seen it about
4 times in the last year. Any ideas? Should oh->alias be
validatedchecked to make sure it is not empty string in this case?

Any experiments you would like me to try to help fix?

Thanks,

-Chris