[haiku-commits] r34257 - haiku/trunk/src/add-ons/kernel/file_systems/bfs

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 25 Nov 2009 22:24:45 +0100 (CET)

Author: bonefish
Date: 2009-11-25 22:24:45 +0100 (Wed, 25 Nov 2009)
New Revision: 34257
Changeset: http://dev.haiku-os.org/changeset/34257/haiku

Modified:
   haiku/trunk/src/add-ons/kernel/file_systems/bfs/Inode.h
   haiku/trunk/src/add-ons/kernel/file_systems/bfs/bfs.h
Log:
On 64 bit machines the bfs_inode::pad field is too small for a
DoublyLinkedListLink. That actually seems to get the bfs_shell working
properly.


Modified: haiku/trunk/src/add-ons/kernel/file_systems/bfs/Inode.h
===================================================================
--- haiku/trunk/src/add-ons/kernel/file_systems/bfs/Inode.h     2009-11-25 
21:21:58 UTC (rev 34256)
+++ haiku/trunk/src/add-ons/kernel/file_systems/bfs/Inode.h     2009-11-25 
21:24:45 UTC (rev 34257)
@@ -180,10 +180,17 @@
                                                                { 
ASSERT_WRITE_LOCKED_RW_LOCK(&fLock); }
 #endif
 
+#ifdef B_HAIKU_64_BIT
                        Link*                   GetDoublyLinkedListLink()
+                                                               { return 
&fListLink; }
+                       const Link*             GetDoublyLinkedListLink() const
+                                                               { return 
&fListLink; }
+#else
+                       Link*                   GetDoublyLinkedListLink()
                                                                { return 
(Link*)&fNode.pad[0]; }
                        const Link*             GetDoublyLinkedListLink() const
                                                                { return 
(Link*)&fNode.pad[0]; }
+#endif
 
 private:
                                                        Inode(const Inode& 
other);
@@ -241,6 +248,10 @@
                                // we need those values to ensure we will remove
                                // the correct keys from the indices
 
+#ifdef B_HAIKU_64_BIT
+                       Link                    fListLink;
+#endif
+
                        mutable recursive_lock fSmallDataLock;
                        SinglyLinkedList<AttributeIterator> fIterators;
 };

Modified: haiku/trunk/src/add-ons/kernel/file_systems/bfs/bfs.h
===================================================================
--- haiku/trunk/src/add-ons/kernel/file_systems/bfs/bfs.h       2009-11-25 
21:21:58 UTC (rev 34256)
+++ haiku/trunk/src/add-ons/kernel/file_systems/bfs/bfs.h       2009-11-25 
21:24:45 UTC (rev 34257)
@@ -202,7 +202,8 @@
        };
        bigtime_t       status_change_time;
        int32           pad[2];
-               // we use this member as a doubly linked list link
+               // on 32 bit architectures we use this member as a doubly 
linked list
+               // link
 
        small_data      small_data_start[0];
 


Other related posts:

  • » [haiku-commits] r34257 - haiku/trunk/src/add-ons/kernel/file_systems/bfs - ingo_weinhold