Commit c2cc7028e41c76e44b6e247c4b495c7523b23c87

Authored by Amir Goldstein
Committed by Theodore Ts'o
1 parent 688f869ce3

jbd2: add the b_cow_tid field to journal_head struct

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>

Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff

include/linux/journal-head.h
... ... @@ -41,6 +41,13 @@
41 41 unsigned b_modified;
42 42  
43 43 /*
  44 + * This feild tracks the last transaction id in which this buffer
  45 + * has been cowed
  46 + * [jbd_lock_bh_state()]
  47 + */
  48 + unsigned b_cow_tid;
  49 +
  50 + /*
44 51 * Copy of the buffer data frozen for writing to the log.
45 52 * [jbd_lock_bh_state()]
46 53 */