[SOLVED + PATCH]: documented Oops running big-endian reiserfs on parisc architecture

From: thunder7@xs4all.nl
Date: Sun Sep 02 2001 - 12:57:17 EST


On Sun, Sep 02, 2001 at 03:00:23PM +0100, Matthew Wilcox wrote:
> On Sun, Sep 02, 2001 at 10:55:38AM +0200, thunder7@xs4all.nl wrote:
> > ReiserFS version 3.6.25
> > bonnie[163]: Unaligned data reference 28
>
> > which makes the error somewhere around here in
> > fs/reiserfs/namei.c, function reiserfs_add_entry, after call to
> > padd_item, before call to reiserfs_find_entry:
> >
> > padd_item ((char *)(deh + 1), ROUND_UP (namelen), namelen);
> >
> > /* entry is ready to be pasted into tree, set 'visibility' and 'stat data in entry' attributes */
> > mark_de_without_sd (deh);
> > visible ? mark_de_visible (deh) : mark_de_hidden (deh);
> >
> > /* find the proper place for the new entry */
> > memset (bit_string, 0, sizeof (bit_string));
> > de.de_gen_number_bit_string = (char *)bit_string;
> > retval = reiserfs_find_entry (dir, name, namelen, &path, &de);
>
> I suspect mark_de_without_sd is an inlined function/macro and this will
> be where the unaligned data reference is happening.
>
Correct. And the comments just above there about alignment are very
enlightening; it seems that the IBM/S390 architecture has some special
needs, and I just tested that my PA-RISC kernel has the same needs.
Thus I am able to present a real bugfix.

This patch allows me to run bonnie on a reiserfs partition with pa-risc
linux.

--- linux/include/linux/reiserfs_fs.h Sun Sep 2 21:54:25 2001
+++ linux-new/include/linux/reiserfs_fs.h Sun Sep 2 20:47:27 2001
@@ -924,7 +924,7 @@
 #define DEH_Visible 2

 /* 64 bit systems (and the S/390) need to be aligned explicitly -jdm */
-#if BITS_PER_LONG == 64 || defined(__s390__)
+#if BITS_PER_LONG == 64 || defined(__s390__) || defined(__hppa__)
 # define ADDR_UNALIGNED_BITS (3)
 #endif

This applies to linux-2.4.9-pa13 with
endian-safe-reiserfs-for-2.4.8.patch and to 2.4.9-ac5.

Please apply,
Jurriaan

-- 
It is well to remember, my son, that the entire population of the
universe, with one trifling exception, is composed of others.
        John Andrew Holmes
GNU/Linux 2.4.9-ac5 SMP/ReiserFS 2x1402 bogomips load av: 0.98 0.83 0.37
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Sep 07 2001 - 21:00:15 EST