Add a conditional so we don't have to drag in everything when a user
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 5 Feb 2008 01:44:04 +0000 (01:44 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 5 Feb 2008 01:44:04 +0000 (01:44 +0000)
just wants to use hammer_ioctl.h.

Reported-by: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>
sys/vfs/hammer/hammer_disk.h

index fcb7fb9..133e4d3 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/vfs/hammer/hammer_disk.h,v 1.20 2008/02/04 08:33:17 dillon Exp $
+ * $DragonFly: src/sys/vfs/hammer/hammer_disk.h,v 1.21 2008/02/05 01:44:04 dillon Exp $
  */
 
 #ifndef VFS_HAMMER_DISK_H_
@@ -79,6 +79,12 @@ typedef u_int64_t hammer_tid_t;
 #define HAMMER_MIN_RECTYPE     0x0U
 #define HAMMER_MAX_RECTYPE     0xFFFFU
 
+/*
+ * Don't include the whole mess unless the caller also has included
+ * the hammer alist header.  The ioctl code only needs hammer_tid_t.
+ */
+#ifdef HAMMER_ALIST_METAELMS_256_1LYR
+
 /*
  * Most HAMMER data structures are embedded in 16K filesystem buffers.
  * All filesystem buffers except those designated as pure-data buffers
@@ -705,4 +711,6 @@ union hammer_data_ondisk {
        struct hammer_inode_data inode;
 };
 
+#endif /* HAMMER_ALIST_METAELMS_256_1LYR */
+
 #endif