linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vyacheslav Dubeyko <slava@dubeyko.com>
To: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk,
	hch@infradead.org, akpm@linux-foundation.org
Subject: Re: [PATCH 00/14] hfsplus: introduce journal replay functionality
Date: Fri, 27 Dec 2013 10:39:09 +0400	[thread overview]
Message-ID: <1388126349.3960.23.camel@slavad-ubuntu> (raw)
In-Reply-To: <1388073465.26381.BPMail_high_noncarrier@web172306.mail.ir2.yahoo.com>

On Thu, 2013-12-26 at 15:57 +0000, Hin-Tak Leung wrote:

> - It appears that you don't treat the special files (catalog, etc) special? netgear's does; 
> but i think there is a mistake in that they don't consider them ever getting fragmented,
> so they were not journaling those files properly. 

Technical Note TN1150:
"On HFS Plus volumes, the journal info block is stored as a file (so
 that its space can be properly represented in a catalog record and the
 allocation bitmap). The name of that file is ".journal_info_block" and
 it is stored in the volume's root directory. The journal header and
 journal buffer are stored together in a different file named
 ".journal", also in the volume's root directory. Each of these files
 are contiguous on disk (they occupy exactly one extent). An
 implementation that uses the journal must prevent the files from being
 accessed as normal files."

"Note:
 An implementation must find the journal info block by using the
 journalInfoBlock field of the volume header, not by the file name.
 Similarly, an implementation must find the journal header and journal
 buffer using the contents of the journal info block, not the file
 name."

So, I use namely special structures hfsplus_journal_info_block and
hfsplus_journal_header for accessing to journal and replaying of it.

As far as I can see, the Netgear's code has many issues:
(1) It doesn't work for the case of 8KB - 64KB block size;
(2) I suspect that it implements journal wrapping incorrectly;
(3) It doesn't take into account that block list can be placed in
several file system blocks;
(4) It doesn't check validity of transaction sequence numbers, blocks'
checksums and so on.

> I'll try to spend some time reading your patches and maybe even try them out. Will write again. 

If you have opportunity for testing journal replay patch set then it
will be great. I have tested this implementation on different volume's
states that it was created under Mac OS X "Tiger" and "Snow Leopard".
And it is necessary testing for volumes that it is created under Mac OS
X "Lion". I don't expect that it will some troubles with journal
replaying for the case of HFS+ volumes are created under "Lion". But,
anyway, independent testing is good idea always.

Thanks,
Vyacheslav Dubeyko.



  reply	other threads:[~2013-12-27  6:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-26 15:57 [PATCH 00/14] hfsplus: introduce journal replay functionality Hin-Tak Leung
2013-12-27  6:39 ` Vyacheslav Dubeyko [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-01-19  1:50 Hin-Tak Leung
2014-01-20  7:54 ` Vyacheslav Dubeyko
2013-12-26  9:41 Vyacheslav Dubeyko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1388126349.3960.23.camel@slavad-ubuntu \
    --to=slava@dubeyko.com \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=htl10@users.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).