Skip to content

Commit

Permalink
jbd2: add the b_cow_tid field to journal_head struct
Browse files Browse the repository at this point in the history
The b_cow_tid field will be used by the ext4 snapshots code to store
the transaction id when the buffer was last cowed.

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

On 64bit machines this field uses fills in a padding "hole" 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.

Signed-off-by: Amir Goldstein <amir73il@users.sf.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Amir Goldstein authored and Theodore Ts'o committed Mar 21, 2011
1 parent 688f869 commit c2cc702
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/linux/journal-head.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,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()]
Expand Down

0 comments on commit c2cc702

Please sign in to comment.