Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 May 2012 08:38:43 +0000 (UTC)
From:      Dmitry Morozovsky <marck@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r234922 - in stable/9/sys: geom/part sys
Message-ID:  <201205020838.q428chJL074166@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marck (doc committer)
Date: Wed May  2 08:38:43 2012
New Revision: 234922
URL: http://svn.freebsd.org/changeset/base/234922

Log:
  MFC r234417:
  
    VMware environments are not unusual now.  Add VMware partitions recognition
    (both MBR for ESXi <= 4.1 and GPT for ESXi 5) to g_part.
  
    Reviewed by:	ae
    Approved by:	ae

Modified:
  stable/9/sys/geom/part/g_part.c
  stable/9/sys/geom/part/g_part.h
  stable/9/sys/geom/part/g_part_gpt.c
  stable/9/sys/geom/part/g_part_mbr.c
  stable/9/sys/sys/diskmbr.h
  stable/9/sys/sys/gpt.h
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/geom/part/g_part.c
==============================================================================
--- stable/9/sys/geom/part/g_part.c	Wed May  2 08:23:53 2012	(r234921)
+++ stable/9/sys/geom/part/g_part.c	Wed May  2 08:38:43 2012	(r234922)
@@ -103,6 +103,9 @@ struct g_part_alias_list {
 	{ "netbsd-lfs", G_PART_ALIAS_NETBSD_LFS },
 	{ "netbsd-raid", G_PART_ALIAS_NETBSD_RAID },
 	{ "netbsd-swap", G_PART_ALIAS_NETBSD_SWAP },
+	{ "vmware-vmfs", G_PART_ALIAS_VMFS },
+	{ "vmware-vmkdiag", G_PART_ALIAS_VMKDIAG },
+	{ "vmware-reserved", G_PART_ALIAS_VMRESERVED },
 };
 
 SYSCTL_DECL(_kern_geom);

Modified: stable/9/sys/geom/part/g_part.h
==============================================================================
--- stable/9/sys/geom/part/g_part.h	Wed May  2 08:23:53 2012	(r234921)
+++ stable/9/sys/geom/part/g_part.h	Wed May  2 08:38:43 2012	(r234922)
@@ -69,6 +69,9 @@ enum g_part_alias {
 	G_PART_ALIAS_EBR,		/* A EBR partition entry. */
 	G_PART_ALIAS_MS_FAT32,		/* A Microsoft FAT32 partition entry. */
 	G_PART_ALIAS_BIOS_BOOT,		/* A GRUB 2 boot partition entry. */
+	G_PART_ALIAS_VMFS,		/* A VMware VMFS partition entry */
+	G_PART_ALIAS_VMKDIAG,		/* A VMware vmkDiagnostic partition entry */
+	G_PART_ALIAS_VMRESERVED,	/* A VMware reserved partition entry */
 	/* Keep the following last */
 	G_PART_ALIAS_COUNT
 };

Modified: stable/9/sys/geom/part/g_part_gpt.c
==============================================================================
--- stable/9/sys/geom/part/g_part_gpt.c	Wed May  2 08:23:53 2012	(r234921)
+++ stable/9/sys/geom/part/g_part_gpt.c	Wed May  2 08:38:43 2012	(r234922)
@@ -163,6 +163,9 @@ static struct uuid gpt_uuid_linux_data =
 static struct uuid gpt_uuid_linux_lvm = GPT_ENT_TYPE_LINUX_LVM;
 static struct uuid gpt_uuid_linux_raid = GPT_ENT_TYPE_LINUX_RAID;
 static struct uuid gpt_uuid_linux_swap = GPT_ENT_TYPE_LINUX_SWAP;
+static struct uuid gpt_uuid_vmfs = GPT_ENT_TYPE_VMFS;
+static struct uuid gpt_uuid_vmkdiag = GPT_ENT_TYPE_VMKDIAG;
+static struct uuid gpt_uuid_vmreserved = GPT_ENT_TYPE_VMRESERVED;
 static struct uuid gpt_uuid_ms_basic_data = GPT_ENT_TYPE_MS_BASIC_DATA;
 static struct uuid gpt_uuid_ms_reserved = GPT_ENT_TYPE_MS_RESERVED;
 static struct uuid gpt_uuid_ms_ldm_data = GPT_ENT_TYPE_MS_LDM_DATA;
@@ -200,6 +203,9 @@ static struct g_part_uuid_alias {
 	{ &gpt_uuid_linux_lvm,		G_PART_ALIAS_LINUX_LVM,		 0 },
 	{ &gpt_uuid_linux_raid,		G_PART_ALIAS_LINUX_RAID,	 0 },
 	{ &gpt_uuid_linux_swap,		G_PART_ALIAS_LINUX_SWAP,	 0 },
+	{ &gpt_uuid_vmfs,		G_PART_ALIAS_VMFS,		 0 },
+	{ &gpt_uuid_vmkdiag,		G_PART_ALIAS_VMKDIAG,		 0 },
+	{ &gpt_uuid_vmreserved,		G_PART_ALIAS_VMRESERVED,	 0 },
 	{ &gpt_uuid_mbr,		G_PART_ALIAS_MBR,		 0 },
 	{ &gpt_uuid_ms_basic_data,	G_PART_ALIAS_MS_BASIC_DATA,	 0x0b },
 	{ &gpt_uuid_ms_ldm_data,	G_PART_ALIAS_MS_LDM_DATA,	 0 },

Modified: stable/9/sys/geom/part/g_part_mbr.c
==============================================================================
--- stable/9/sys/geom/part/g_part_mbr.c	Wed May  2 08:23:53 2012	(r234921)
+++ stable/9/sys/geom/part/g_part_mbr.c	Wed May  2 08:38:43 2012	(r234922)
@@ -125,6 +125,8 @@ static struct g_part_mbr_alias {
 	{ DOSPTYP_LINUX,	G_PART_ALIAS_LINUX_DATA },
 	{ DOSPTYP_LINLVM,	G_PART_ALIAS_LINUX_LVM },
 	{ DOSPTYP_LINRAID,	G_PART_ALIAS_LINUX_RAID },
+	{ DOSPTYP_VMFS,		G_PART_ALIAS_VMFS },
+	{ DOSPTYP_VMKDIAG,	G_PART_ALIAS_VMKDIAG },
 };
 
 static int

Modified: stable/9/sys/sys/diskmbr.h
==============================================================================
--- stable/9/sys/sys/diskmbr.h	Wed May  2 08:23:53 2012	(r234921)
+++ stable/9/sys/sys/diskmbr.h	Wed May  2 08:38:43 2012	(r234922)
@@ -54,6 +54,8 @@
 #define	DOSPTYP_LINUX	0x83	/* Linux partition */
 #define	DOSPTYP_LINLVM	0x8e	/* Linux LVM partition */
 #define	DOSPTYP_PMBR	0xee	/* GPT Protective MBR */
+#define	DOSPTYP_VMFS	0xfb	/* VMware VMFS partition */
+#define	DOSPTYP_VMKDIAG	0xfc	/* VMware vmkDiagnostic partition */
 #define	DOSPTYP_LINRAID	0xfd	/* Linux raid partition */
 
 struct dos_partition {

Modified: stable/9/sys/sys/gpt.h
==============================================================================
--- stable/9/sys/sys/gpt.h	Wed May  2 08:23:53 2012	(r234921)
+++ stable/9/sys/sys/gpt.h	Wed May  2 08:38:43 2012	(r234922)
@@ -120,6 +120,13 @@ struct gpt_ent {
 #define	GPT_ENT_TYPE_LINUX_LVM		\
 	{0xe6d6d379,0xf507,0x44c2,0xa2,0x3c,{0x23,0x8f,0x2a,0x3d,0xf9,0x28}}
 
+#define	GPT_ENT_TYPE_VMFS		\
+	{0xaa31e02a,0x400f,0x11db,0x95,0x90,{0x00,0x0c,0x29,0x11,0xd1,0xb8}}
+#define	GPT_ENT_TYPE_VMKDIAG		\
+	{0x9d275380,0x40ad,0x11db,0xbf,0x97,{0x00,0x0c,0x29,0x11,0xd1,0xb8}}
+#define	GPT_ENT_TYPE_VMRESERVED		\
+	{0x9198effc,0x31c0,0x11db,0x8f,0x78,{0x00,0x0c,0x29,0x11,0xd1,0xb8}}
+
 #define	GPT_ENT_TYPE_APPLE_BOOT		\
 	{0x426F6F74,0x0000,0x11aa,0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}}
 #define	GPT_ENT_TYPE_APPLE_HFS		\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205020838.q428chJL074166>