* Bugs on big endian systems
@ 2004-03-03 13:01 Pavel Bartusek
2004-03-03 21:29 ` Jeff Mahoney
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Bartusek @ 2004-03-03 13:01 UTC (permalink / raw)
To: Reiserfs-List
[-- Attachment #1: Type: text/plain, Size: 356 bytes --]
Hi list,
The attached patch will fix the bugs which appears only on big endian
systems in the kernel 2.4.25.
regards
Pavel Bartusek
Software Engineering
SYSGO Real-Time Solutions AG | Embedded and Real-Time Software
Lise-Meitner-Str.15
89081 Ulm, Germany
Voice: +49-731-9533-1295
FAX: +49-731-94683-10
www.sysgo.com | www.elinos.com | www.osek.de
[-- Attachment #2: big_endian_fixup.patch --]
[-- Type: text/plain, Size: 1371 bytes --]
--- linux.ori/fs/reiserfs/journal.c Mon Aug 25 13:44:43 2003
+++ linux/fs/reiserfs/journal.c Wed Mar 3 13:26:23 2004
@@ -2094,7 +2094,7 @@
/* make sure that journal matches to the super block */
if (is_reiserfs_jr(rs) &&
- jh->jh_journal.jp_journal_magic != sb_jp_journal_magic(rs)) {
+ le32_to_cpu (jh->jh_journal.jp_journal_magic) != sb_jp_journal_magic(rs)) {
char jname[ 32 ];
char fname[ 32 ];
@@ -2102,7 +2102,7 @@
strcpy( fname, kdevname( p_s_sb->s_dev ) );
printk("journal-460: journal header magic %x (device %s) does not "
"match magic found in super block %x (device %s)\n",
- jh->jh_journal.jp_journal_magic, jname,
+ le32_to_cpu (jh->jh_journal.jp_journal_magic), jname,
sb_jp_journal_magic(rs), fname);
brelse (bhjh);
goto free_and_return;
--- linux.ori/include/linux/reiserfs_fs.h Mon Aug 25 13:44:44 2003
+++ linux/include/linux/reiserfs_fs.h Wed Mar 3 13:25:45 2004
@@ -219,7 +219,7 @@
#define SB_ONDISK_JOURNAL_DEVICE(s) \
le32_to_cpu ((SB_ONDISK_JP(s)->jp_journal_dev))
#define SB_ONDISK_RESERVED_FOR_JOURNAL(s) \
- le32_to_cpu ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
+ le16_to_cpu ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
#define is_block_in_log_or_reserved_area(s, block) \
block >= SB_JOURNAL_1st_RESERVED_BLOCK(s) \
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bugs on big endian systems
2004-03-03 13:01 Bugs on big endian systems Pavel Bartusek
@ 2004-03-03 21:29 ` Jeff Mahoney
2004-03-04 0:21 ` Hans Reiser
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Mahoney @ 2004-03-03 21:29 UTC (permalink / raw)
To: Pavel Bartusek; +Cc: Reiserfs-List
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Pavel -
Thanks. The good news is that the filesystem wouldn't have panicked
because of the SB_ONDISK_RESERVED_FOR_JOURNAL(s) bug. The bad news is
that it wouldn't have mattered because the filesystem could never have
been mounted anyway due to the journal header version mismatch.
I'm surprised nobody's ever tried to mount a relocated journal enabled
filesystem on a big endian machine.
Hans -
This bug appears in both 2.4 and 2.6 kernels and should be fixed in both.
- -Jeff
Pavel Bartusek wrote:
| Hi list,
|
| The attached patch will fix the bugs which appears only on big endian
| systems in the kernel 2.4.25.
|
| regards
|
|
| Pavel Bartusek
| Software Engineering
|
| SYSGO Real-Time Solutions AG | Embedded and Real-Time Software
| Lise-Meitner-Str.15
| 89081 Ulm, Germany
|
| Voice: +49-731-9533-1295
| FAX: +49-731-94683-10
| www.sysgo.com | www.elinos.com | www.osek.de
|
|
| ------------------------------------------------------------------------
|
| --- linux.ori/fs/reiserfs/journal.c Mon Aug 25 13:44:43 2003
| +++ linux/fs/reiserfs/journal.c Wed Mar 3 13:26:23 2004
| @@ -2094,7 +2094,7 @@
|
| /* make sure that journal matches to the super block */
| if (is_reiserfs_jr(rs) &&
| - jh->jh_journal.jp_journal_magic != sb_jp_journal_magic(rs)) {
| + le32_to_cpu (jh->jh_journal.jp_journal_magic) !=
sb_jp_journal_magic(rs)) {
| char jname[ 32 ];
| char fname[ 32 ];
|
| @@ -2102,7 +2102,7 @@
| strcpy( fname, kdevname( p_s_sb->s_dev ) );
| printk("journal-460: journal header magic %x (device %s) does not "
| "match magic found in super block %x (device %s)\n",
| - jh->jh_journal.jp_journal_magic, jname,
| + le32_to_cpu (jh->jh_journal.jp_journal_magic), jname,
| sb_jp_journal_magic(rs), fname);
| brelse (bhjh);
| goto free_and_return;
| --- linux.ori/include/linux/reiserfs_fs.h Mon Aug 25 13:44:44 2003
| +++ linux/include/linux/reiserfs_fs.h Wed Mar 3 13:25:45 2004
| @@ -219,7 +219,7 @@
| #define SB_ONDISK_JOURNAL_DEVICE(s) \
| le32_to_cpu ((SB_ONDISK_JP(s)->jp_journal_dev))
| #define SB_ONDISK_RESERVED_FOR_JOURNAL(s) \
| - le32_to_cpu
((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
| + le16_to_cpu
((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
|
| #define is_block_in_log_or_reserved_area(s, block) \
| block >= SB_JOURNAL_1st_RESERVED_BLOCK(s) \
- --
Jeff Mahoney
SuSE Labs
jeffm@suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFARk4/LPWxlyuTD7IRAkIZAJ0VR8aYna2n3EK/BfZ2SBwKOe9OPQCfYzDH
c8D4gSwDzr93HivtH2FMx5M=
=Jj1U
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bugs on big endian systems
2004-03-03 21:29 ` Jeff Mahoney
@ 2004-03-04 0:21 ` Hans Reiser
2004-03-04 1:55 ` Richard Heycock
0 siblings, 1 reply; 5+ messages in thread
From: Hans Reiser @ 2004-03-04 0:21 UTC (permalink / raw)
To: Jeff Mahoney; +Cc: Pavel Bartusek, Reiserfs-List
Thanks Jeff and Pavel. Nikita, send Pavel the usual agreement, and
we'll send to Linus unless someone finds an objection. Edward, read
this patch, test it on alpha,
and approve it. Elena, test it on x86.
Hans
Jeff Mahoney wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Pavel -
>
> Thanks. The good news is that the filesystem wouldn't have panicked
> because of the SB_ONDISK_RESERVED_FOR_JOURNAL(s) bug. The bad news is
> that it wouldn't have mattered because the filesystem could never have
> been mounted anyway due to the journal header version mismatch.
>
> I'm surprised nobody's ever tried to mount a relocated journal enabled
> filesystem on a big endian machine.
>
> Hans -
>
> This bug appears in both 2.4 and 2.6 kernels and should be fixed in both.
>
> - -Jeff
>
> Pavel Bartusek wrote:
> | Hi list,
> |
> | The attached patch will fix the bugs which appears only on big endian
> | systems in the kernel 2.4.25.
> |
> | regards
> |
> |
> | Pavel Bartusek
> | Software Engineering
> |
> | SYSGO Real-Time Solutions AG | Embedded and Real-Time Software
> | Lise-Meitner-Str.15
> | 89081 Ulm, Germany
> |
> | Voice: +49-731-9533-1295
> | FAX: +49-731-94683-10
> | www.sysgo.com | www.elinos.com | www.osek.de
> |
> |
> |
> ------------------------------------------------------------------------
> |
> | --- linux.ori/fs/reiserfs/journal.c Mon Aug 25 13:44:43 2003
> | +++ linux/fs/reiserfs/journal.c Wed Mar 3 13:26:23 2004
> | @@ -2094,7 +2094,7 @@
> |
> | /* make sure that journal matches to the super block */
> | if (is_reiserfs_jr(rs) &&
> | - jh->jh_journal.jp_journal_magic != sb_jp_journal_magic(rs)) {
> | + le32_to_cpu (jh->jh_journal.jp_journal_magic) !=
> sb_jp_journal_magic(rs)) {
> | char jname[ 32 ];
> | char fname[ 32 ];
> |
> | @@ -2102,7 +2102,7 @@
> | strcpy( fname, kdevname( p_s_sb->s_dev ) );
> | printk("journal-460: journal header magic %x (device %s) does
> not "
> | "match magic found in super block %x (device %s)\n",
> | - jh->jh_journal.jp_journal_magic, jname,
> | + le32_to_cpu (jh->jh_journal.jp_journal_magic), jname,
> | sb_jp_journal_magic(rs), fname);
> | brelse (bhjh);
> | goto free_and_return;
> | --- linux.ori/include/linux/reiserfs_fs.h Mon Aug 25 13:44:44 2003
> | +++ linux/include/linux/reiserfs_fs.h Wed Mar 3 13:25:45 2004
> | @@ -219,7 +219,7 @@
> | #define SB_ONDISK_JOURNAL_DEVICE(s) \
> | le32_to_cpu ((SB_ONDISK_JP(s)->jp_journal_dev))
> | #define SB_ONDISK_RESERVED_FOR_JOURNAL(s) \
> | - le32_to_cpu
> ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
> | + le16_to_cpu
> ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
> |
> | #define is_block_in_log_or_reserved_area(s, block) \
> | block >= SB_JOURNAL_1st_RESERVED_BLOCK(s) \
>
>
> - --
> Jeff Mahoney
> SuSE Labs
> jeffm@suse.com
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.2 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFARk4/LPWxlyuTD7IRAkIZAJ0VR8aYna2n3EK/BfZ2SBwKOe9OPQCfYzDH
> c8D4gSwDzr93HivtH2FMx5M=
> =Jj1U
> -----END PGP SIGNATURE-----
>
>
--
Hans
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bugs on big endian systems
2004-03-04 0:21 ` Hans Reiser
@ 2004-03-04 1:55 ` Richard Heycock
2004-03-04 1:59 ` Pierre Abbat
0 siblings, 1 reply; 5+ messages in thread
From: Richard Heycock @ 2004-03-04 1:55 UTC (permalink / raw)
To: Reiserfs-List
On Thu, 2004-03-04 at 11:21, Hans Reiser wrote:
> Thanks Jeff and Pavel. Nikita, send Pavel the usual agreement, and
> we'll send to Linus unless someone finds an objection. Edward, read
> this patch, test it on alpha,
The Alpha is a little endian machine.
rgh
> and approve it. Elena, test it on x86.
>
> Hans
>
> Jeff Mahoney wrote:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> >
> > Pavel -
> >
> > Thanks. The good news is that the filesystem wouldn't have panicked
> > because of the SB_ONDISK_RESERVED_FOR_JOURNAL(s) bug. The bad news is
> > that it wouldn't have mattered because the filesystem could never have
> > been mounted anyway due to the journal header version mismatch.
> >
> > I'm surprised nobody's ever tried to mount a relocated journal enabled
> > filesystem on a big endian machine.
> >
> > Hans -
> >
> > This bug appears in both 2.4 and 2.6 kernels and should be fixed in both.
> >
> > - -Jeff
> >
> > Pavel Bartusek wrote:
> > | Hi list,
> > |
> > | The attached patch will fix the bugs which appears only on big endian
> > | systems in the kernel 2.4.25.
> > |
> > | regards
> > |
> > |
> > | Pavel Bartusek
> > | Software Engineering
> > |
> > | SYSGO Real-Time Solutions AG | Embedded and Real-Time Software
> > | Lise-Meitner-Str.15
> > | 89081 Ulm, Germany
> > |
> > | Voice: +49-731-9533-1295
> > | FAX: +49-731-94683-10
> > | www.sysgo.com | www.elinos.com | www.osek.de
> > |
> > |
> > |
> > ------------------------------------------------------------------------
> > |
> > | --- linux.ori/fs/reiserfs/journal.c Mon Aug 25 13:44:43 2003
> > | +++ linux/fs/reiserfs/journal.c Wed Mar 3 13:26:23 2004
> > | @@ -2094,7 +2094,7 @@
> > |
> > | /* make sure that journal matches to the super block */
> > | if (is_reiserfs_jr(rs) &&
> > | - jh->jh_journal.jp_journal_magic != sb_jp_journal_magic(rs)) {
> > | + le32_to_cpu (jh->jh_journal.jp_journal_magic) !=
> > sb_jp_journal_magic(rs)) {
> > | char jname[ 32 ];
> > | char fname[ 32 ];
> > |
> > | @@ -2102,7 +2102,7 @@
> > | strcpy( fname, kdevname( p_s_sb->s_dev ) );
> > | printk("journal-460: journal header magic %x (device %s) does
> > not "
> > | "match magic found in super block %x (device %s)\n",
> > | - jh->jh_journal.jp_journal_magic, jname,
> > | + le32_to_cpu (jh->jh_journal.jp_journal_magic), jname,
> > | sb_jp_journal_magic(rs), fname);
> > | brelse (bhjh);
> > | goto free_and_return;
> > | --- linux.ori/include/linux/reiserfs_fs.h Mon Aug 25 13:44:44 2003
> > | +++ linux/include/linux/reiserfs_fs.h Wed Mar 3 13:25:45 2004
> > | @@ -219,7 +219,7 @@
> > | #define SB_ONDISK_JOURNAL_DEVICE(s) \
> > | le32_to_cpu ((SB_ONDISK_JP(s)->jp_journal_dev))
> > | #define SB_ONDISK_RESERVED_FOR_JOURNAL(s) \
> > | - le32_to_cpu
> > ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
> > | + le16_to_cpu
> > ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
> > |
> > | #define is_block_in_log_or_reserved_area(s, block) \
> > | block >= SB_JOURNAL_1st_RESERVED_BLOCK(s) \
> >
> >
> > - --
> > Jeff Mahoney
> > SuSE Labs
> > jeffm@suse.com
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.2.2 (GNU/Linux)
> > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> >
> > iD8DBQFARk4/LPWxlyuTD7IRAkIZAJ0VR8aYna2n3EK/BfZ2SBwKOe9OPQCfYzDH
> > c8D4gSwDzr93HivtH2FMx5M=
> > =Jj1U
> > -----END PGP SIGNATURE-----
> >
> >
--
"It is possible to make things of great complexity out of things
that are very simple. There is no conservation of simplicity"
-- Stephen Wolfram
Richard Heycock <rgh@roughage.com.au>
tel : 0410 646 369
key fingerprint : 909D CBFA C669 AC2F A937 AFA4 661B 9D21 EAAB 4291
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bugs on big endian systems
2004-03-04 1:55 ` Richard Heycock
@ 2004-03-04 1:59 ` Pierre Abbat
0 siblings, 0 replies; 5+ messages in thread
From: Pierre Abbat @ 2004-03-04 1:59 UTC (permalink / raw)
To: Reiserfs-List
On Wednesday 03 March 2004 20:55, Richard Heycock wrote:
> On Thu, 2004-03-04 at 11:21, Hans Reiser wrote:
> > Thanks Jeff and Pavel. Nikita, send Pavel the usual agreement, and
> > we'll send to Linus unless someone finds an objection. Edward, read
> > this patch, test it on alpha,
>
> The Alpha is a little endian machine.
True, but it is also an eight-byte machine, which is different from the Intel,
so it should be tested. Macs are big-endian.
phma
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-03-04 1:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-03 13:01 Bugs on big endian systems Pavel Bartusek
2004-03-03 21:29 ` Jeff Mahoney
2004-03-04 0:21 ` Hans Reiser
2004-03-04 1:55 ` Richard Heycock
2004-03-04 1:59 ` Pierre Abbat
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.