From: Ryoichi KATO Subject: Re: e2fsck bogus error report on orphan-list Date: Fri, 20 Jul 2007 08:20:26 +0900 Message-ID: <87fy3krnet.wl%ryoichi@me.sony.co.jp> References: <873azkl7x4.wl%ryoichi@me.sony.co.jp> <20070719165510.GB14815@thunk.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: linux-ext4@vger.kernel.org, sct@redhat.com, akpm@linux-foundation.org, adilger@clusterfs.com, tim.bird@am.sony.com To: tytso@mit.edu Return-path: Received: from MGW3.Sony.CO.JP ([137.153.0.15]:40002 "EHLO mgw3.sony.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758262AbXGSXn5 (ORCPT ); Thu, 19 Jul 2007 19:43:57 -0400 In-Reply-To: <20070719165510.GB14815@thunk.org> Sender: linux-ext4-owner@vger.kernel.org List-Id: linux-ext4.vger.kernel.org At Thu, 19 Jul 2007 12:55:10 -0400, Theodore Tso wrote: > On Fri, Jul 20, 2007 at 12:39:19AM +0900, Ryoichi.Kato@jp.sony.com wrote: > > Hi, > > I hit a problem of ext3/e2fsck on orphan-list handling. > > Wow, I'm rather impressed that this was sufficient for a presentation > at a conference. You could have just sent me e-mail. :-) I know it's a rare case for most of the people and not sure it is a 'bug', but I thought it might happen more offten for CE people. So, I asked for opinions of CE people in a lighting session of "CELF Technical Jamboree." > > 1. Delete a file in an ext3 filesystem in early 1970 > > Dare I ask *why* the system clock was set in the 1970's? Umm... don't > do that. As Tim pointed out, embedded devices offten omit RTC battery. > > 2. Set RTC to 2007, and then mount/write the filesystem. > > There is code that detects when the time is set back in the 1970's > (normally due to a bad clock battery) and thus disables this > particular check. So it only triggers when the clock was previously > bad, and is now good. Actually, it's a *real* problem happend for my car navigation product. Until GPS signal is available, it's clock was 1970. And for servers and PCs, it's possible that RTC backup battery run out, then clock get set correctly afterward by, say, NTP. > The net is that the check is basically a sanity check to make any bugs > in the orphaned list handling would be discovered, although it can > also trigger if there is block device corruption where part of the > inode table is corrupted. I had added hueristics that for most people > meant that it never triggered, so I'm surprised that it actually did > in your environment. Still, if it did, the easist thing to do is to > just turn it off. Now, after things behind the problem turned out, it's easy. But let me point out that, * It is very difficult to relate RTC to the problem. No clue without digging into e2fsck source code. * -p (preen) option of e2fsck doen't fix it automatically. Though I'm not sure but, maybe it's safe to correct the problem automatically? Actually, it took me for several weeks to solve, because it is rare. My system only reset RTC for hardware reset or when main battery run out but not for software reset. But it can happen. Thank you. -- Ryoichi KATO System Design Dept. No4 Audio Development & Engineering Div. Sony Corporation Audio Business Group Tel +81-3-3599-3862 / Fax +81-3-3599-3859