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. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html