--- gvfs-1.6.3/metadata/metatree.c	2010-02-21 14:53:30.000000000 +1300
+++ gvfs-1.6.3-mod/metadata/metatree.c	2010-09-06 22:18:48.000000000 +1200
@@ -170,6 +170,27 @@ struct _MetaTree {
   MetaJournal *journal;
 };
 
+/* Unfortunately the journal entries are only aligned to 32 bit boundaries
+   but on some 64-bit RISC architectures (e.g. Alpha) this is insufficient
+   to guarantee correct alignment of 64-bit accesses. This is not a show
+   stopper but does cause inefficient traps to the kernel and pollution of
+   kernel logs.  Rather than fix the alignment we provide a helper function,
+   dependent on features specific to gcc, to correctly access a 64-bit datum
+   that may be misaligned.  This causes no loss of inefficiency on
+   architectures where alignment is not an issue provided we are compiled
+   with compiler optimisation turned on. */
+#ifdef __GNUC__
+struct una_u64 { guint64 x __attribute__((packed)); };
+static inline guint64 ldq_u(guint64 *p)
+{
+        const struct una_u64 *ptr = (const struct una_u64 *) p;
+        return ptr->x;
+}
+#else
+#define ldq_u(x) (*(x))
+#endif
+
+
 static void         meta_tree_refresh_locked   (MetaTree    *tree);
 static MetaJournal *meta_journal_open          (MetaTree    *tree,
 						const char  *filename,
@@ -1303,7 +1324,7 @@ meta_journal_iterate (MetaJournal *journ
       sizep = (guint32 *)entry;
       entry = (MetaJournalEntry *)((char *)entry - GUINT32_FROM_BE (*(sizep-1)));
 
-      mtime = GUINT64_FROM_BE (entry->mtime);
+      mtime = GUINT64_FROM_BE( ldq_u(&(entry->mtime)) );
       journal_path = &entry->path[0];
 
       if (journal_entry_is_key_type (entry) &&
@@ -2287,7 +2308,7 @@ apply_journal_to_builder (MetaTree *tree
   entry = journal->first_entry;
   while (entry < journal->last_entry)
     {
-      mtime = GUINT64_FROM_BE (entry->mtime);
+      mtime = GUINT64_FROM_BE( ldq_u(&(entry->mtime)) );
       journal_path = &entry->path[0];
 
       switch (entry->entry_type)
