[Oracleasm-commits] jlbec commits r307 - in branches/extended: include/linux kernel

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Fri Jun 3 20:35:20 CDT 2005


Author: jlbec
Date: 2005-06-03 20:35:17 -0500 (Fri, 03 Jun 2005)
New Revision: 307

Modified:
   branches/extended/include/linux/asmabi.h
   branches/extended/include/linux/asmkernel.h
   branches/extended/kernel/oracleasm.c
Log:
add consumer id support

Modified: branches/extended/include/linux/asmabi.h
===================================================================
--- branches/extended/include/linux/asmabi.h	2005-06-03 23:58:59 UTC (rev 306)
+++ branches/extended/include/linux/asmabi.h	2005-06-04 01:35:17 UTC (rev 307)
@@ -108,6 +108,7 @@
 	ASM_DISK_OPTION_ABS		= (1 << 2),
 	ASM_DISK_OPTION_ABN		= (1 << 3),
 	ASM_DISK_OPTION_TAG		= (1 << 4),
+	ASM_DISK_OPTION_CID		= (1 << 5),
 };
 
 /* Users of the commands should always use ASMOP_IO */

Modified: branches/extended/include/linux/asmkernel.h
===================================================================
--- branches/extended/include/linux/asmkernel.h	2005-06-03 23:58:59 UTC (rev 306)
+++ branches/extended/include/linux/asmkernel.h	2005-06-04 01:35:17 UTC (rev 307)
@@ -84,7 +84,8 @@
 
 /* Flags for flags_asm_ioc */
 #define ASM_XORCHK	0x0010	/* request includes XOR of data */
-#define ASM_TAGCHK	0x0020	/* request includes partition tag */
+#define ASM_CONSUMER	0x0020	/* request includes consumer id and
+				  resource plan */
 
 /*
  * Disk/Fence Keys - (unused as yet)
@@ -123,7 +124,8 @@
 	__u32		abn_asm_ioc;
 	__u32		abn_mask_asm_ioc;
 	__u32		spare1_asm_ioc;
-	__u64		tag_asm_ioc;
+	__u32		consumer_asm_ioc;
+	__u32		resource_plan_asm_ioc;
 	__u64		reserved_asm_ioc;
 	__u32		buffer_asm_ioc;
 	__u32		check_asm_ioc;
@@ -154,7 +156,8 @@
 	__u32		abn_asm_ioc;
 	__u32		abn_mask_asm_ioc;
 	__u32		spare1_asm_ioc;
-	__u64		tag_asm_ioc;
+	__u32		consumer_asm_ioc;
+	__u32		resource_plan_asm_ioc;
 	__u64		reserved_asm_ioc;
 	__u64		buffer_asm_ioc;
 	__u64		check_asm_ioc;

Modified: branches/extended/kernel/oracleasm.c
===================================================================
--- branches/extended/kernel/oracleasm.c	2005-06-03 23:58:59 UTC (rev 306)
+++ branches/extended/kernel/oracleasm.c	2005-06-04 01:35:17 UTC (rev 307)
@@ -152,6 +152,7 @@
 #define PRIORITY_REQUEST_OPTION_NAME "ORCLPRIORITY"
 #define XOR_REQUEST_OPTION_NAME "ORCLXOR"
 #define ABS_REQUEST_OPTION_NAME "ORCLABS"
+#define CID_REQUEST_OPTION_NAME "ORCLCID"
 
 
 
@@ -180,6 +181,12 @@
 					   sectors. */
 };
 
+struct cid_request_option {
+	struct request_option	o_ro;
+	u32			o_cid;  /* Consumer ID */
+	u32			o_plan; /* Resource plan ID */
+};
+
 /*
  * asmfs super-block data in memory
  */
@@ -729,6 +736,8 @@
 			interface |= ASM_DISK_OPTION_XOR;
 		else if (!strcmp(ro->o_name, ABS_REQUEST_OPTION_NAME))
 			interface |= ASM_DISK_OPTION_ABS;
+		else if (!strcmp(ro->o_name, CID_REQUEST_OPTION_NAME))
+			interface |= ASM_DISK_OPTION_CID;
 		ro = ro->o_next;
 	}
 
@@ -1253,6 +1262,20 @@
 		r->r_options = ro;
 	}
 
+	if (ioc->flags_asm_ioc & ASM_CONSUMER) {
+		ro = kmalloc(sizeof(struct cid_request_option),
+			     GFP_KERNEL);
+		if (!ro)
+			return -ENOMEM;
+		ro->o_name = CID_REQUEST_OPTION_NAME;
+		((struct cid_request_option *)ro)->o_cid =
+			ioc->consumer_asm_ioc;
+		((struct cid_request_option *)ro)->o_plan =
+			ioc->resource_plan_asm_ioc;
+		ro->o_next = r->r_options;
+		r->r_options = ro;
+	}
+
 	return 0;
 }  /* asm_associate_options() */
 



More information about the Oracleasm-commits mailing list