Skip to contentSkip to conversation

+ hfsplus-add-necessary-declarations-for-journal-replay.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Feb 4, 2014 Hfsplus filesystem

lore
Share & tools
lore
#0 lore raw

Subject: + hfsplus-add-necessary-declarations-for-journal-replay.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 04 Feb 2014 14:33:31 -0800

The patch titled
Subject: hfsplus: add necessary declarations for journal replay
has been added to the -mm tree. Its filename is
hfsplus-add-necessary-declarations-for-journal-replay.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/hfsplus-add-necessary-declarations-for-journal-replay.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/hfsplus-add-necessary-declarations-for-journal-replay.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Vyacheslav Dubeyko <[email protected]>
Subject: hfsplus: add necessary declarations for journal replay

Add necessary declarations of HFS+ journal's on-disk structures, declaration of structure for journal's object in memory and different journal related flags.

If HFSPLUS_VOL_JOURNALED is set in the volume header's attributes field, the volume has a journal. The journal data stuctures consist of a journal info block, journal header, and journal buffer. The journal info block indicates the location and size of the journal header and journal buffer. The journal buffer is the space set aside to hold transactions. The journal header describes which part of the journal buffer is active and contains transactions waiting to be committed.

A single transaction consists of several blocks, including both the data to be written, and the location where that data is to be written. This is represented on disk by a block list header, which describes the number and sizes of the blocks, immediately followed by the contents of those blocks.

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.

---

 fs/hfsplus/hfsplus_fs.h  |   23 ++++++++++++++++
 fs/hfsplus/hfsplus_raw.h |   53 ++++++++++++++++++++++++++++++++++++-
 2 files changed, 75 insertions(+), 1 deletion(-)
fs/hfsplus/hfsplus_fs.h renamed from fs/hfsplus/hfsplus_fs.h~hfsplus-add-necessary-declarations-for-journal-replay +23 -0
diff -puN fs/hfsplus/hfsplus_fs.h~hfsplus-add-necessary-declarations-for-journal-replay fs/hfsplus/hfsplus_fs.h
@@ -31,6 +31,11 @@
 #define DBG_BITMAP	0x00000040
 #define DBG_ATTR_MOD	0x00000080
 #define DBG_ACL_MOD	0x00000100
+#define DBG_JOURNAL	0x00000200
+#define DBG_JREPLAY	0x00000400
+#define DBG_JTRANS	0x00000800
+#define DBG_JCOMMIT	0x00001000
+#define DBG_JCHKPT	0x00002000
 
 #if 0
 #define DBG_MASK	(DBG_EXTENT|DBG_INODE|DBG_BNODE_MOD)
@@ -126,6 +131,23 @@ struct hfs_bnode {
 #define HFS_BNODE_DIRTY		3
 #define HFS_BNODE_DELETED	4
 
+/* An HFS+ Journal held in memory */
+struct hfsplus_journal {
+	struct mutex jnl_lock;
+
+	/* Journal info block specific */
+	void *jib_buf;
+	struct hfsplus_journal_info_block *jib;
+
+	/* Journal header specific */
+	void *jh_buf;
+	struct hfsplus_journal_header *jh;
+
+	/* TODO: Pointer of JBD */
+
+	struct super_block *sbp;
+};
+
 /*
  * Attributes file states
  */
@@ -146,6 +168,7 @@ struct hfsplus_sb_info {
 	struct hfsplus_vh *s_vhdr;
 	void *s_backup_vhdr_buf;
 	struct hfsplus_vh *s_backup_vhdr;
+	struct hfsplus_journal *jnl;
 	struct hfs_btree *ext_tree;
 	struct hfs_btree *cat_tree;
 	struct hfs_btree *attr_tree;
fs/hfsplus/hfsplus_raw.h renamed from fs/hfsplus/hfsplus_raw.h~hfsplus-add-necessary-declarations-for-journal-replay +52 -1

69 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are

hfsplus-add-necessary-declarations-for-journal-replay.patch hfsplus-rework-hfsplus_submit_bio-method.patch hfsplus-implement-init-destroy-journal-object-functionality.patch hfsplus-implement-functionality-for-hfsplus_journal_need_init-flag.patch hfsplus-implement-norecovery-mount-option-support.patch hfsplus-fix-remount-issue.patch hfsplus-implement-check-consistency-of-journal-log-file.patch hfsplus-introduce-descriptor-of-block-list-buffer.patch hfsplus-implement-get-and-verify-block-list-header-functionality.patch hfsplus-implement-functionality-of-getting-transactions-block-info.patch hfsplus-implement-functionality-of-journal-log-wrapping.patch hfsplus-implement-functionality-of-transactions-block-check.patch hfsplus-implement-replay-transactions-block-functionality.patch hfsplus-implement-replay-journal-functionality.patch hfsplus-integrate-journal-replay-support-into-driver.patch