From mboxrd@z Thu Jan 1 00:00:00 1970 From: hirofumi@mail.parknet.co.jp (OGAWA Hirofumi) Date: Thu, 01 Dec 2011 23:38:24 +0900 Subject: VFAT i_pos value In-Reply-To: <4ED6AF4C.5060707@gnukai.com> (Kai Meyer's message of "Wed, 30 Nov 2011 15:33:48 -0700") References: <4ED6AF4C.5060707@gnukai.com> Message-ID: <87obvs5pcv.fsf@devron.myhome.or.jp> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Kai Meyer writes: > I'm getting this error: > FAT: Filesystem error (dev sblsnap0) > fat_get_cluster: invalid cluster chain (i_pos 523791) > > I'm wondering if there was a way to figure out what sector is causing > the error? I would like to try and track down what is changing that > sector and fix the problem. Is there a straight forward way to convert > i_pos to a sector value? I've been staring at the fat.c and fat.h code > all morning, and I'm having trouble grok'ing the flow. The i_pos means directory entry (contains inode information in unix-fs) position, block number == i_pos / (logical-blocksize / 32) offset == i_pos & (logical-blocksize / 32) the above position's directory entry contains information for problematic file. This is how to use i_pos information. FWIW, in this error case, the cluster chain in FAT table which is pointed by that entry, it has invalid cluster value. Thanks. -- OGAWA Hirofumi