* ext2 errors w/2.5.x @ 2002-06-18 2:56 David S. Miller 2002-06-18 3:25 ` Andreas Dilger 0 siblings, 1 reply; 4+ messages in thread From: David S. Miller @ 2002-06-18 2:56 UTC (permalink / raw) To: linux-kernel I started seeing these occaisionally on my SMP boxes about a month or two ago, is anyone else seeing something similar? EXT2-fs error (device sd(8,17)): ext2_find_entry: zero-length directory entry Upon reboot e2fsck is forced to run (since the partition is marked as having errors by the kernel) and no problems are discovered. Any clues? ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ext2 errors w/2.5.x 2002-06-18 2:56 ext2 errors w/2.5.x David S. Miller @ 2002-06-18 3:25 ` Andreas Dilger 2002-06-18 4:15 ` Andrew Morton 0 siblings, 1 reply; 4+ messages in thread From: Andreas Dilger @ 2002-06-18 3:25 UTC (permalink / raw) To: David S. Miller; +Cc: linux-kernel, Andrew Morton On Jun 17, 2002 19:56 -0700, David S. Miller wrote: > I started seeing these occaisionally on my SMP boxes about a month or > two ago, is anyone else seeing something similar? > > EXT2-fs error (device sd(8,17)): ext2_find_entry: zero-length directory entry > > Upon reboot e2fsck is forced to run (since the partition is marked as > having errors by the kernel) and no problems are discovered. > > Any clues? This would appear to be from accessing a buffer (page) which has not yet been read from disk. Otherwise you would have an error from e2fsck also. Andrew has been mucking the most in this area... Cheers, Andreas -- Andreas Dilger http://www-mddsp.enel.ucalgary.ca/People/adilger/ http://sourceforge.net/projects/ext2resize/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ext2 errors w/2.5.x 2002-06-18 3:25 ` Andreas Dilger @ 2002-06-18 4:15 ` Andrew Morton 2002-06-18 4:17 ` David S. Miller 0 siblings, 1 reply; 4+ messages in thread From: Andrew Morton @ 2002-06-18 4:15 UTC (permalink / raw) To: Andreas Dilger; +Cc: David S. Miller, linux-kernel Andreas Dilger wrote: > > On Jun 17, 2002 19:56 -0700, David S. Miller wrote: > > I started seeing these occaisionally on my SMP boxes about a month or > > two ago, is anyone else seeing something similar? > > > > EXT2-fs error (device sd(8,17)): ext2_find_entry: zero-length directory entry > > > > Upon reboot e2fsck is forced to run (since the partition is marked as > > having errors by the kernel) and no problems are discovered. > > > > Any clues? > > This would appear to be from accessing a buffer (page) which has not yet > been read from disk. Otherwise you would have an error from e2fsck also. > Andrew has been mucking the most in this area... > Not that, I hope. Possibly it's the interaction between block_write_full_pages's memset outside i_size, truncate and lookup. It took me a ridiculous amount of time to get that "correct", so it's a suspicion point. Or possibly locking between lookup and truncate (rmdir) and/or creat. Dave, I assume this is with 8k pages and 4k blocks? Is it repeatable enough to conduct a little experiment? Like, lock the page in ext2_find_entry? --- linux-2.5.22/fs/ext2/dir.c Wed May 29 11:42:43 2002 +++ 25/fs/ext2/dir.c Mon Jun 17 20:50:48 2002 @@ -348,6 +348,7 @@ struct ext2_dir_entry_2 * ext2_find_entr char *kaddr; page = ext2_get_page(dir, n); if (!IS_ERR(page)) { + lock_page(page); kaddr = page_address(page); de = (ext2_dirent *) kaddr; kaddr += ext2_last_byte(dir, n) - reclen; @@ -355,6 +356,7 @@ struct ext2_dir_entry_2 * ext2_find_entr if (de->rec_len == 0) { ext2_error(dir->i_sb, __FUNCTION__, "zero-length directory entry"); + unlock_page(page); ext2_put_page(page); goto out; } @@ -367,10 +369,12 @@ struct ext2_dir_entry_2 * ext2_find_entr if (++n >= npages) n = 0; } while (n != start); + unlock_page(page); out: return NULL; found: + unlock_page(page); *res_page = page; ei->i_dir_start_lookup = n; return de; - ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ext2 errors w/2.5.x 2002-06-18 4:15 ` Andrew Morton @ 2002-06-18 4:17 ` David S. Miller 0 siblings, 0 replies; 4+ messages in thread From: David S. Miller @ 2002-06-18 4:17 UTC (permalink / raw) To: akpm; +Cc: adilger, linux-kernel From: Andrew Morton <akpm@zip.com.au> Date: Mon, 17 Jun 2002 21:15:46 -0700 Andreas Dilger wrote: > On Jun 17, 2002 19:56 -0700, David S. Miller wrote: > > EXT2-fs error (device sd(8,17)): ext2_find_entry: zero-length directory entry > > This would appear to be from accessing a buffer (page) which has not yet > been read from disk. Otherwise you would have an error from e2fsck also. > Andrew has been mucking the most in this area... Not that, I hope. Possibly it's the interaction between block_write_full_pages's memset outside i_size, truncate and lookup. It took me a ridiculous amount of time to get that "correct", so it's a suspicion point. Or possibly locking between lookup and truncate (rmdir) and/or creat. Dave, I assume this is with 8k pages and 4k blocks? Yes, that is the case here. Is it repeatable enough to conduct a little experiment? Like, lock the page in ext2_find_entry? I'll try out your patch and get back to you, thanks. Franks a lot, David S. Miller davem@redhat.com ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-06-18 4:22 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-06-18 2:56 ext2 errors w/2.5.x David S. Miller 2002-06-18 3:25 ` Andreas Dilger 2002-06-18 4:15 ` Andrew Morton 2002-06-18 4:17 ` David S. Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox