Yaffs will select Yaffs1 for deives with 512 byte writing size. Moreover, it will enable inband_tags automatically for devices with small oob. However, Yaffs1 can not work with inband_tags. So move the oob size checking before auto selecting Yaffs1.
Signed-off-by: Jiang Lu <[email protected]> --- fs/yaffs2/yaffs_vfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/yaffs2/yaffs_vfs.c b/fs/yaffs2/yaffs_vfs.c index 568cef4..c3b7368 100644 --- a/fs/yaffs2/yaffs_vfs.c +++ b/fs/yaffs2/yaffs_vfs.c @@ -2708,17 +2708,17 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version, yaffs_version = 2; } + if (mtd->oobavail < sizeof(struct yaffs_packed_tags2) || + options.inband_tags) + inband_tags = 1; + /* Added NCB 26/5/2006 for completeness */ - if (yaffs_version == 2 && !options.inband_tags + if (yaffs_version == 2 && !inband_tags && WRITE_SIZE(mtd) == 512) { yaffs_trace(YAFFS_TRACE_ALWAYS, "auto selecting yaffs1"); yaffs_version = 1; } - if (mtd->oobavail < sizeof(struct yaffs_packed_tags2) || - options.inband_tags) - inband_tags = 1; - if(yaffs_verify_mtd(mtd, yaffs_version, inband_tags) < 0) return NULL; -- 1.8.3.4 _______________________________________________ linux-yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/linux-yocto
