File: journal_params_autofix.patch.nolongerapplied

package info (click to toggle)
reiserfsprogs 1%3A3.6.27-3
  • links: PTS
  • area: main
  • in suites: buster
  • size: 3,148 kB
  • sloc: ansic: 27,337; sh: 4,143; makefile: 87
file content (46 lines) | stat: -rw-r--r-- 1,852 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
===== reiserfscore/journal.c 1.19 vs edited =====
--- 1.19/reiserfsprogs/reiserfscore/journal.c	Thu Apr 24 17:25:56 2003
+++ edited/reiserfscore/journal.c	Tue Apr 29 19:58:48 2003
@@ -481,21 +481,6 @@
     }
     
     if (check) {
-	
-	j_head = (struct reiserfs_journal_header *)(bh->b_data);
-
-	if (get_jp_journal_1st_block (&j_head->jh_journal) != get_jp_journal_1st_block (sb_jp (sb)) || 
-	    get_jp_journal_dev (&j_head->jh_journal) != get_jp_journal_dev (sb_jp (sb)) || 
-	    get_jp_journal_size (&j_head->jh_journal) != get_jp_journal_size (sb_jp (sb))) 
-	{
-	    reiserfs_warning (stderr, 
-		"\nreiserfs_open_journal: journal parameters from the super block does not match \n"
-		"to journal parameters from the journal. It is expected if you created your fs \n"
-		"with old reiserfsprogs. In this case rebuild-sb will fix it all for you.\n", j_filename);
-	    brelse (bh);
-	    return 0;        
-	}
-	
 	/* Check the superblock's journal parameters. */
 	if (!is_reiserfs_jr_magic_string (sb)) {    
 	    if (get_jp_journal_dev (sb_jp(sb)) != 0 || 
@@ -506,6 +491,20 @@
 		brelse (bh);
 		return 0;
 	    }
+	} else {
+	    j_head = (struct reiserfs_journal_header *)(bh->b_data);
+	    
+	    if (get_jp_journal_1st_block (&j_head->jh_journal) != get_jp_journal_1st_block (sb_jp (sb)) || 
+		get_jp_journal_dev (&j_head->jh_journal) != get_jp_journal_dev (sb_jp (sb)) || 
+		get_jp_journal_size (&j_head->jh_journal) != get_jp_journal_size (sb_jp (sb))) 
+	    {
+		reiserfs_warning (stderr, 
+		    "\nreiserfs_open_journal: journal parameters from the super block does not match \n"
+		    "to journal parameters from the journal. It is expected if you created your fs \n"
+		    "with old reiserfsprogs. In this case rebuild-sb will fix it all for you.\n", j_filename);
+		brelse (bh);
+		return 0;        
+	    }
 	}
     }