From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hin-Tak Leung Subject: Re: [PATCH v3 01/15] hfsplus: add necessary declarations for journal replay Date: Thu, 13 Feb 2014 20:07:24 +0000 (GMT) Message-ID: <1392322044.28154.YahooMailBasic@web172303.mail.ir2.yahoo.com> References: <47FEE593-6B31-4781-8785-C1DC5C33B6ED@dubeyko.com> Reply-To: htl10@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Cc: Linux FS devel list , Al Viro , ChristophHellwig , Andrew Morton To: Sergei Antonov , Vyacheslav Dubeyko Return-path: Received: from nm31-vm8.bullet.mail.ir2.yahoo.com ([212.82.97.95]:31566 "EHLO nm31-vm8.bullet.mail.ir2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750932AbaBMUH1 convert rfc822-to-8bit (ORCPT ); Thu, 13 Feb 2014 15:07:27 -0500 In-Reply-To: <47FEE593-6B31-4781-8785-C1DC5C33B6ED@dubeyko.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: -------------------------------------------- On Wed, 12/2/14, Vyacheslav Dubeyko wrote: Subject: Re: [PATCH v3 01/15] hfsplus: add necessary declarations for journal replay To: "Sergei Antonov" Cc: "Linux FS devel list" , "Al Viro" , "ChristophHellwig" , "Hin-Tak Leung" , "Andrew Morton" Date: Wednesday, 12 February, 2014, 17:59 On Feb 12, 2014, at 7:50 PM, Sergei Antonov wrote: > On 12 February 2014 17:38, Vyacheslav Dubeyko wrote: >> On Wed, 2014-02-12 at 17:15 +0100, Sergei Antonov wrote: >> >>>> The journal info block (struct hfsplus_journal_info_block) is big-endian >>>> structure. The rest structures of HFS+ journal (struct hfsplus_journal_header, >>>> struct hfsplus_blhdr, struct hfsplus_block_info) are little-endian. >>> >>> Journal header and block lists are either big-endian or little-endian. >>> See JOURNAL_NEED_SWAP in Apple's code. >> >> Do you know how to create journal with BE internal structures? > > You need a PowerPC Mac I guess. > You guess or you know? Please, share concrete way. >> And I can't see such opportunities in newfs_hfs tool. > > Ha! New_hfs does not initialize journal at all. > Namely, newfs_hfs create journal. Otherwise, what tool does it? >> Could you share the way of creation >> HFS+ journal with big-endian Journal header and block lists? > > As I said, header and block lists are BE. I can only repeat. Could you share the way of creation HFS+ journal with big-endian Journal header and block lists? Thanks, Vyacheslav Dubeyko. Hi all, I Have mentioned earlier that I have the powerpc version of Darwin 8 (equivalent to Mac OS X 10.4) running inside pearpc, and have other uses of it and therefore have given it some use. I can look into this - and probably will, when I try v3 of Vyacheslav's patch set. Darwin 8 does certainly noticed it was uncleanly shut down and display a message about journal replay the next time it starts; also it seems to notice the journal had been played with by somebody else - there is a message about invalid/invalidating journal entries when I ran fsck.hfsplus manually between unclean shut down and restart. (That's assuming fsck.hfsplus can cope with disk images written by the powerpc version of darwin 8 correctly, one way or another - I should hope so, as it is not unthinkable for a mac user to own both kind of macs). So it appears that the journal is not emptied by fsck.hfsplus, but simply marked done and no longer relevant, and the darwin kernel code notices that. HTH. Hin-Tak