The patch titled gfs2: use unified UUID/GUID code has been removed from the -mm tree. Its filename was gfs2-use-unified-uuid-guid-code.patch This patch was dropped because it had testing failures The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: gfs2: use unified UUID/GUID code From: Huang Ying <ying.huang@xxxxxxxxx> Replace u8[16] UUID definition in gfs2. Signed-off-by: Huang Ying <ying.huang@xxxxxxxxx> Cc: Joe Perches <joe@xxxxxxxxxxx> Cc: Steven Whitehouse <swhiteho@xxxxxxxxxx> Cc: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/gfs2/incore.h | 3 ++- fs/gfs2/ops_fstype.c | 2 +- fs/gfs2/sys.c | 14 ++++---------- include/linux/gfs2_ondisk.h | 3 ++- 4 files changed, 9 insertions(+), 13 deletions(-) diff -puN fs/gfs2/incore.h~gfs2-use-unified-uuid-guid-code fs/gfs2/incore.h --- a/fs/gfs2/incore.h~gfs2-use-unified-uuid-guid-code +++ a/fs/gfs2/incore.h @@ -15,6 +15,7 @@ #include <linux/slow-work.h> #include <linux/dlm.h> #include <linux/buffer_head.h> +#include <linux/uuid.h> #define DIO_WAIT 0x00000010 #define DIO_METADATA 0x00000020 @@ -483,7 +484,7 @@ struct gfs2_sb_host { char sb_lockproto[GFS2_LOCKNAME_LEN]; char sb_locktable[GFS2_LOCKNAME_LEN]; - u8 sb_uuid[16]; + uuid_be sb_uuid; }; /* diff -puN fs/gfs2/ops_fstype.c~gfs2-use-unified-uuid-guid-code fs/gfs2/ops_fstype.c --- a/fs/gfs2/ops_fstype.c~gfs2-use-unified-uuid-guid-code +++ a/fs/gfs2/ops_fstype.c @@ -234,7 +234,7 @@ static void gfs2_sb_in(struct gfs2_sb_ho memcpy(sb->sb_lockproto, str->sb_lockproto, GFS2_LOCKNAME_LEN); memcpy(sb->sb_locktable, str->sb_locktable, GFS2_LOCKNAME_LEN); - memcpy(sb->sb_uuid, str->sb_uuid, 16); + sb->sb_uuid = str->sb_uuid; } /** diff -puN fs/gfs2/sys.c~gfs2-use-unified-uuid-guid-code fs/gfs2/sys.c --- a/fs/gfs2/sys.c~gfs2-use-unified-uuid-guid-code +++ a/fs/gfs2/sys.c @@ -68,20 +68,14 @@ static ssize_t fsname_show(struct gfs2_s return snprintf(buf, PAGE_SIZE, "%s\n", sdp->sd_fsname); } -static int gfs2_uuid_valid(const u8 *uuid) +static int gfs2_uuid_valid(const uuid_be *uuid) { - int i; - - for (i = 0; i < 16; i++) { - if (uuid[i]) - return 1; - } - return 0; + return uuid_be_cmp(*uuid, NULL_UUID_BE); } static ssize_t uuid_show(struct gfs2_sbd *sdp, char *buf) { - const u8 *uuid = sdp->sd_sb.sb_uuid; + const uuid_be *uuid = &sdp->sd_sb.sb_uuid; buf[0] = '\0'; if (!gfs2_uuid_valid(uuid)) return 0; @@ -565,7 +559,7 @@ static int gfs2_uevent(struct kset *kset struct kobj_uevent_env *env) { struct gfs2_sbd *sdp = container_of(kobj, struct gfs2_sbd, sd_kobj); - const u8 *uuid = sdp->sd_sb.sb_uuid; + const uuid_be *uuid = &sdp->sd_sb.sb_uuid; add_uevent_var(env, "LOCKTABLE=%s", sdp->sd_table_name); add_uevent_var(env, "LOCKPROTO=%s", sdp->sd_proto_name); diff -puN include/linux/gfs2_ondisk.h~gfs2-use-unified-uuid-guid-code include/linux/gfs2_ondisk.h --- a/include/linux/gfs2_ondisk.h~gfs2-use-unified-uuid-guid-code +++ a/include/linux/gfs2_ondisk.h @@ -11,6 +11,7 @@ #define __GFS2_ONDISK_DOT_H__ #include <linux/types.h> +#include <linux/uuid.h> #define GFS2_MAGIC 0x01161970 #define GFS2_BASIC_BLOCK 512 @@ -124,7 +125,7 @@ struct gfs2_sb { struct gfs2_inum __pad3; /* Was quota inode in gfs1 */ struct gfs2_inum __pad4; /* Was licence inode in gfs1 */ #define GFS2_HAS_UUID 1 - __u8 sb_uuid[16]; /* The UUID, maybe 0 for backwards compat */ + uuid_be sb_uuid; /* The UUID, maybe 0 for backwards compat */ }; /* _ Patches currently in -mm which might be from ying.huang@xxxxxxxxx are origin.patch linux-next.patch crypto-nfg.patch gfs2-use-unified-uuid-guid-code.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html