xfs: use uuid_be to implement the uuid_t type
authorChristoph Hellwig <hch@lst.de>
Fri, 5 May 2017 07:53:09 +0000 (09:53 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 5 Jun 2017 14:56:36 +0000 (16:56 +0200)
Use the generic Linux definition to implement our UUID type, this will
allow using more generic infrastructure in the future.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/uuid.h
fs/xfs/xfs_linux.h

index 104db0f..4f1441b 100644 (file)
 #ifndef __XFS_SUPPORT_UUID_H__
 #define __XFS_SUPPORT_UUID_H__
 
-typedef struct {
-       unsigned char   __u_bits[16];
-} uuid_t;
-
 extern int uuid_is_nil(uuid_t *uuid);
 extern int uuid_equal(uuid_t *uuid1, uuid_t *uuid2);
 extern void uuid_getnodeuniq(uuid_t *uuid, int fsid [2]);
index 044fb0e..89ee5ec 100644 (file)
@@ -19,6 +19,7 @@
 #define __XFS_LINUX__
 
 #include <linux/types.h>
+#include <linux/uuid.h>
 
 /*
  * Kernel specific type declarations for XFS
@@ -38,6 +39,8 @@ typedef __s64                 xfs_daddr_t;    /* <disk address> type */
 typedef __u32                  xfs_dev_t;
 typedef __u32                  xfs_nlink_t;
 
+typedef uuid_be                        uuid_t;
+
 #include "xfs_types.h"
 
 #include "kmem.h"