diff mbox

[1/2] add the b_cow_tid field to journal_head struct

Message ID AANLkTikduxunBSq0z6BuXJVHXJMzeTUfexz2H71_J6BR@mail.gmail.com
State Accepted, archived
Headers show

Commit Message

Amir Goldstein March 1, 2011, 1:52 p.m. UTC
The field is used by ext4 snapshots code to store the transaction id
in which the buffer was last cowed.

Merging this patch to kernel 2.6.39, will allow users to test ext4
snapshots as a standalone module, without the need to patch and
install a development kernel.

On a 64bit machine the field is using an aliged memory padding space
and does not increase the size of the struct.

On a 32bit machine this patch increases the size of the struct from
60 to 64 bytes:

Before:
jbd2_journal_head     57    126     60   63    1 : tunables  120   60
 0 : slabdata      2      2      0

After:
jbd2_journal_head     61    118     64   59    1 : tunables  120   60
 0 : slabdata      2      2      0

Signed-off-by: Amir Goldstein <amir73il@users.sf.net>
---
 include/linux/journal-head.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

Comments

Theodore Ts'o March 21, 2011, 1:14 a.m. UTC | #1
I've added this patch to the ext4 patch queue.

     	   	      	     	  - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/journal-head.h b/include/linux/journal-head.h
index 525aac3..44e95d0 100644
--- a/include/linux/journal-head.h
+++ b/include/linux/journal-head.h
@@ -41,6 +41,13 @@  struct journal_head {
 	unsigned b_modified;

 	/*
+	 * This feild tracks the last transaction id in which this buffer
+	 * has been cowed
+	 * [jbd_lock_bh_state()]
+	 */
+	unsigned b_cow_tid;
+
+	/*
 	 * Copy of the buffer data frozen for writing to the log.
 	 * [jbd_lock_bh_state()]
 	 */