From: Hin-Tak Leung Subject: Re: [PATCH] hfsplus: add journal replay Date: Sun, 23 Feb 2014 06:03:52 +0000 (GMT) Message-ID: <1393135432.86384.YahooMailBasic@web172301.mail.ir2.yahoo.com> Reply-To: htl10@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, hch@infradead.org, akpm@linux-foundation.org, slava@dubeyko.com To: saproj@gmail.com Return-path: Received: from nm47.bullet.mail.ne1.yahoo.com ([98.138.120.54]:42761 "EHLO nm47.bullet.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750780AbaBWGGz convert rfc822-to-8bit (ORCPT ); Sun, 23 Feb 2014 01:06:55 -0500 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: ------------------------------ On Sun, Feb 23, 2014 5:33 AM GMT Sergei Antonov wrote: >> --- a/fs/hfsplus/hfsplus_fs.h >> +++ b/fs/hfsplus/hfsplus_fs.h >> ... >> @@ -166,6 +167,11 @@ struct hfsplus_sb_info { >>=A0 =A0 u32 total_blocks; >>=A0 =A0 u32 data_clump_blocks, rsrc_clump_blocks; >>=20 >> +=A0 =A0 /* immutable data on the placement of the journal (if there= is one) */ >> +=A0 =A0 u64 journal_offset;=A0 =A0 /* relative to volume start */ >> +=A0 =A0 u64 journal_size;=A0 =A0 /* relative to volume start */ >> +=A0 =A0 bool journal_swab;=A0 =A0 /* need swap bytes in journal */ >> + >>=A0 =A0 /* mutable data from the volume header, protected by alloc_mu= tex */ >>=A0 =A0 u32 free_blocks; >>=A0 =A0 struct mutex alloc_mutex; >> ... >>=20 >> --- a/fs/hfsplus/hfsplus_raw.h >> +++ b/fs/hfsplus/hfsplus_raw.h >> @@ -105,7 +105,7 @@ struct hfsplus_vh { >>=A0 =A0 __be16 version; >>=A0 =A0 __be32 attributes; >>=A0 =A0 __be32 last_mount_vers; >> -=A0 =A0 u32 reserved; >> +=A0 =A0 __be32 jrnl_info_block; >>=20 >>=A0 =A0 __be32 create_date; >>=A0 =A0 __be32 modify_date; >> @@ -145,6 +145,69 @@ struct hfsplus_vh { >> #define HFSPLUS_VOL_JOURNALED=A0 =A0 =A0 =A0 (1 < 13) >> #define HFSPLUS_VOL_SOFTLOCK=A0 =A0 =A0 =A0 (1 < 15) >>=20 >> +/* Journal info */ >> +struct hfs_jrnl_info { >> +=A0 =A0 __be32 flags; >> +=A0 =A0 u32 unused[8]; >> +=A0 =A0 __be64 journal_offset;=A0 =A0 /* Misaligned! relative to vo= lume start */ >> +=A0 =A0 __be64 journal_size;=A0 =A0 /* Misaligned! relative to volu= me start */ >> +} __packed; >> + >> ... >>=20 >> Storing=A0 journal_offset and journal_size in two places seems redun= dant >> - the journal info block is part of the volume header struct, which = is accessible >> from the superblock struct. > >It is not in volume header. Only its block number is in header. Hmm, would be make sense to hook them up? seems a bit strange to have a smaller loose-hanging struct which is 2/3 of the superblock a= ddition. > >>=20 >> There are one or two spelling mistakes in one of the comments, as we= ll >> as some grammar issues.=20 > >Thanks for spotting. Could you show them in a format like this? >- wrong text >+ corrected text > >I'd like to know of them. 'byte_len is a miltiple of journal block size' <-> multiple 'converts it validates it' <-> missing 'and' Those are the two I noticed; obviously I wasn't particularly looking fo= r them, as that sort of things aren't important in the bigger scheme of t= hings. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html