Re: [PATCH 2/3] xfs: use uuid_be to implement the uuid_t type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 5, 2017 at 10:57 AM, Christoph Hellwig <hch@xxxxxx> wrote:
> 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@xxxxxx>

Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx>


> diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h
> index 044fb0e15390..89ee5ec66837 100644
> --- a/fs/xfs/xfs_linux.h
> +++ b/fs/xfs/xfs_linux.h
> @@ -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;
> +

How about moving this typedef to linux/uuid.h.
It's weird to have a non xfs_ prefixed typedef as it was
and placing it here is even more weird.

Yes, only xfs uses uuid_t right now, but this could mark the intentions
in a central place, so other code can follow suit (i.e. libnvdimm) and
start using uuid_t as well.

I realize this series is intended to be xfs internal cleanup,
so could be part of a follow up patch set.

If this is acceptable by Andy, I can re-post my series based on top
of this one to hoist uuid_t and the rest of the xfs helpers to linux/uuid.h.

Amir.
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux