From rick@efn.org Mon Apr 21 22:07:14 2008
Received: from samwise.efn.org ([12.33.21.33])
	by stoneboat.aleph1.co.uk with esmtp (Exim 4.63)
	(envelope-from <rick@efn.org>) id 1Jo3E6-0000Es-JA
	for yaffs@stoneboat.aleph1.co.uk; Mon, 21 Apr 2008 22:07:14 +0100
Received: from efn.org (c-67-171-210-97.hsd1.or.comcast.net [67.171.210.97])
	by samwise.efn.org (Postfix) with ESMTP id 8993617011C
	for <yaffs@stoneboat.aleph1.co.uk>;
	Mon, 21 Apr 2008 14:06:56 -0700 (PDT)
Received: from rick by efn.org with local (Exim 4.69)
	(envelope-from <rick@efn.org>) id 1Jo3Dz-00032H-Li
	for yaffs@stoneboat.aleph1.co.uk; Mon, 21 Apr 2008 14:06:55 -0700
To: yaffs@stoneboat.aleph1.co.uk
Message-Id: <E1Jo3Dz-00032H-Li@efn.org>
From: Rick Bronson <rick@efn.org>
Date: Mon, 21 Apr 2008 14:06:55 -0700
X-SA-Exim-Connect-IP: 12.33.21.33
X-SA-Exim-Mail-From: rick@efn.org
X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,
	SPF_PASS autolearn=ham version=3.2.3
X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000)
X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk)
Subject: [Yaffs] yaffs_guts question
X-BeenThere: yaffs@lists.aleph1.co.uk
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: rick@efn.org
List-Id: Discussion of YAFFS NAND flash filesystem <yaffs.lists.aleph1.co.uk>
List-Unsubscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs>, 
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=unsubscribe>
List-Archive: <http://lists.aleph1.co.uk/lurker/list/yaffs.html>
List-Post: <mailto:yaffs@lists.aleph1.co.uk>
List-Help: <mailto:yaffs-request@lists.aleph1.co.uk?subject=help>
List-Subscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs>,
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=subscribe>
X-List-Received-Date: Mon, 21 Apr 2008 21:07:14 -0000

Hi,

  Is it true that everywhere the parent->variantType is set to
YAFFS_OBJECT_TYPE_DIRECTORY that the INIT_LIST_HEAD should be called
on variant.directoryVariant.children?

  I have an issue where parent->variantType is being set to
YAFFS_OBJECT_TYPE_DIRECTORY but the
variant.directoryVariant.children.next is never set so it
ends up crashing at

------------------------------------------------------------------
/* Now add it */
list_add(&obj->siblings, &directory->variant.directoryVariant.children);
------------------------------------------------------------------

  inside yaffs_AddObjectToDirectory()

  The variantType is being set to YAFFS_OBJECT_TYPE_DIRECTORY here:
------------------------------------------------------------------
/* we need to load this info */

in->valid = 1;
in->variantType = oh->type;
------------------------------------------------------------------

  Thanks very much for any guidance.

  Rick Bronson


------------------------------------------------------------------
  Here are my Linux 2.6.22 specifics:

  yaffs2 version:

yaffs2-ian-20070523.tgz

  NAND chip (512/16):

Flash chip found:                                                               
         Manufacturer ID: 0x98, Chip ID: 0x75 (Toshiba TC58256FT/DC)            
1 flash chips found. Total nand_chip size: 32 MB                                

  kernel:

Linux acq 2.6.22-rc1 #170 Thu Jul 5 13:58:14 PDT 2007 armv4tl GNU/Linux

  .config file:

CONFIG_YAFFS_FS=y
CONFIG_YAFFS_YAFFS1=y
CONFIG_YAFFS_9BYTE_TAGS=y
CONFIG_YAFFS_YAFFS2=y
CONFIG_YAFFS_AUTO_YAFFS2=y
# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10
# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set

