public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] jbd2: Set the right uuid for block tag
@ 2022-07-11 16:26 Wang Jianjian
  2022-07-15 15:11 ` Wang Jianjian
  0 siblings, 1 reply; 4+ messages in thread
From: Wang Jianjian @ 2022-07-11 16:26 UTC (permalink / raw)
  To: linux-ext4; +Cc: Wang Jianjian

journal->j_uuid is not initialized and let us use the uuid from
j_superblock. And since this is the only place where j_uuid is used
so that we can remove it.

Signed-off-by: Wang Jianjian <wangjianjian0@foxmail.com>
---
 fs/jbd2/commit.c     |  2 +-
 include/linux/jbd2.h | 10 ----------
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 5b9408e3b370..efde9c494e7a 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -720,7 +720,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
 		bufs++;
 
 		if (first_tag) {
-			memcpy (tagp, journal->j_uuid, 16);
+			memcpy (tagp, journal->j_superblock->s_uuid, 16);
 			tagp += 16;
 			space_left -= 16;
 			first_tag = 0;
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index de9536680b2b..9d51f4b55cb5 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -1079,16 +1079,6 @@ struct journal_s
 	 */
 	tid_t			j_commit_request;
 
-	/**
-	 * @j_uuid:
-	 *
-	 * Journal uuid: identifies the object (filesystem, LVM volume etc)
-	 * backed by this journal.  This will eventually be replaced by an array
-	 * of uuids, allowing us to index multiple devices within a single
-	 * journal and to perform atomic updates across them.
-	 */
-	__u8			j_uuid[16];
-
 	/**
 	 * @j_task: Pointer to the current commit thread for this journal.
 	 */
-- 
2.34.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-18 16:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-11 16:26 [PATCH] jbd2: Set the right uuid for block tag Wang Jianjian
2022-07-15 15:11 ` Wang Jianjian
2022-07-15 17:43   ` Theodore Ts'o
2022-07-18 16:08     ` Wang Jianjian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox