Skip to contentSkip to conversation

jbd: change the field "b_cow_tid" of struct journal_head from type unsigned to tid_t

PATCH In review Wang Sheng-Hui 4 participants 5 messages Jul 25, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 jbd: change the field "b_cow_tid" of struct journal_head from type unsigned to tid_t

The patch is against 3.0

In the definition of struct journal_head, the comment for the field "unsigned b_cow_tid" says the field tracks the last transaction id in which this buffer has been cowed.

In the header part of file journal-head.h, it defines
typedef unsigned int tid_t;
We should use type tid_t to define transaction id fields.

Change the field "b_cow_tid" of struct journal_head from type unsigned to tid_t.

---
 include/linux/journal-head.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/journal-head.h +1 -1
index 44e95d0..423cb6d 100644
@@ -45,7 +45,7 @@ struct journal_head {
 	 * has been cowed
 	 * [jbd_lock_bh_state()]
 	 */
-	unsigned b_cow_tid;
+	tid_t b_cow_tid;
 
 	/*
 	 * Copy of the buffer data frozen for writing to the log.
Signature · 1 line
1.7.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Wang Sheng-Hui

The patch is against 3.0

In the definition of struct journal_head, the comment for the field "unsigned b_cow_tid" says the field tracks the last transaction id in which this buffer has been cowed.

Quoted 8 lines

In the header part of file journal-head.h, it defines typedef unsigned int  tid_t;
We should use type tid_t to define transaction id fields.

Change the field "b_cow_tid" of struct journal_head from type unsigned to tid_t.

my bad.

Quoted 20 lines

---
 include/linux/journal-head.h |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/journal-head.h +1 -2
index 44e95d0..423cb6d 100644
@@ -45,7 +45,7 @@ struct journal_head {
         * has been cowed
         * [jbd_lock_bh_state()]
         */
-       unsigned b_cow_tid;
+       tid_t b_cow_tid;
 
        /*
         * Copy of the buffer data frozen for writing to the log.
--

1.7.1

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to Wang Sheng-Hui
Quoted 5 lines · Wang Sheng-Hui

The patch is against 3.0

In the definition of struct journal_head, the comment for the field "unsigned b_cow_tid" says the field tracks the last transaction id in which this buffer has been cowed.

The correct fix is to simply remove the field, as it's entirely unused.

#3 lore raw
Quoted 9 lines · Christoph Hellwig
Quoted 5 lines · Wang Sheng-Hui

The patch is against 3.0

In the definition of struct journal_head, the comment for the field "unsigned b_cow_tid" says the field tracks the last transaction id in which this buffer has been cowed.

The correct fix is to simply remove the field, as it's entirely unused.

It's part of the ext4 snapshot patches, which are making their way into mainline as slowly as one could expect them to.
This patch was merged for 2.6.39, so more users will be able to test ext4 snapshots
independent module without having to patch their kernels, so that the patches get proper
QA before they arrive to mainline.

Cheers,
Amir.

#4 lore raw
In reply to Wang Sheng-Hui
Quoted 6 lines · Wang Sheng-Hui

The patch is against 3.0

In the definition of struct journal_head, the comment for the field "unsigned b_cow_tid" says the field tracks the last transaction id in which this buffer has been cowed.

Quoted 6 lines

In the header part of file journal-head.h, it defines
typedef unsigned int tid_t;
We should use type tid_t to define transaction id fields.

Change the field "b_cow_tid" of struct journal_head from type unsigned to tid_t.

Hmm, I didn't notice Ted merged this from ext4cow patch series. Looking
at struct journal_head, I'm thinking we might split jbd and jbd2 version of this structure. jbd one could be 16 bytes shorter. Anyway, I've merged your patch. Thanks.

Honza

Quoted 22 lines
---
 include/linux/journal-head.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/journal-head.h +1 -1
index 44e95d0..423cb6d 100644
@@ -45,7 +45,7 @@ struct journal_head {
 	 * has been cowed
 	 * [jbd_lock_bh_state()]
 	 */
-	unsigned b_cow_tid;
+	tid_t b_cow_tid;
 
 	/*
 	 * Copy of the buffer data frozen for writing to the log.
Signature · 1 line
1.7.1
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR