From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Warren Turkal" Subject: Re: [PATCH 2/2] Fix journal detection on HFS+. Date: Mon, 1 Dec 2008 02:28:56 -0800 Message-ID: References: <1227240087-29413-1-git-send-email-wt@penguintechs.org> <1227240087-29413-2-git-send-email-wt@penguintechs.org> <1227240087-29413-3-git-send-email-wt@penguintechs.org> <200811230552.02221.zippel@linux-m68k.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "Andrew Morton" , linux-fsdevel@vger.kernel.org To: "Roman Zippel" Return-path: Received: from rv-out-0506.google.com ([209.85.198.230]:53083 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750930AbYLAK25 (ORCPT ); Mon, 1 Dec 2008 05:28:57 -0500 Received: by rv-out-0506.google.com with SMTP id k40so2400969rvb.1 for ; Mon, 01 Dec 2008 02:28:56 -0800 (PST) In-Reply-To: Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: I have a drive that has the property of having the journal bit set and having 0 in the journal_info_block field that mounts in rw on MacOS X. That's how I discovered the problem. wt On Thu, Nov 27, 2008 at 8:21 AM, Roman Zippel wrote: > Hi, > > On Tue, 25 Nov 2008, Warren Turkal wrote: > >> On Sat, Nov 22, 2008 at 8:52 PM, Roman Zippel wrote: >> > I'm curious how common it is to have the journal bit set but no journal block, >> > I haven't seen this case so far. >> >> It's so uncommon that the technote for HFS+ doesn't mention it. >> However, I did find [1], and it's (c) by Apple. Look at the comment at >> [2] to see what tipped me off. > > That likely also means the journal bit is cleared. If you want to verify > this, you should check the actual kernel source and there I can't find > anywhere, that they handle a zero journal block specially, thus it will > result in a failure to replay the journal, so I don't see why we should > allow write access to the volume in this case. > >> > IMO more useful would be to read the journal block and check if there is >> > anything that needs to be replayed. >> > If you're interested in a second step you could replay the journal, it's not >> > that difficult to do, it's pretty much just copying blocks around. >> >> I am actually looking into doing the journal replaying, but i haven't >> gotten around to it yet. > > That's why I suggested to do the replay check first, as it's relatively > simple to do. > > bye, Roman >