-1.00.03-cvs (2003-08-19)
+1.00.04-cvs (2003-08-21)
return 0;
}
-int dm_table_create(struct dm_table **result, int mode)
+int dm_table_create(struct dm_table **result, int mode, unsigned num_targets)
{
struct dm_table *t = kmalloc(sizeof(*t), GFP_NOIO);
INIT_LIST_HEAD(&t->devices);
atomic_set(&t->holders, 1);
- /* allocate a single nodes worth of targets to begin with */
- if (alloc_targets(t, KEYS_PER_NODE)) {
+ if (!num_targets)
+ num_targets = KEYS_PER_NODE;
+
+ if (alloc_targets(t, num_targets)) {
kfree(t);
t = NULL;
return -ENOMEM;
* Functions for manipulating a table. Tables are also reference
* counted.
*---------------------------------------------------------------*/
-int dm_table_create(struct dm_table **result, int mode);
+int dm_table_create(struct dm_table **result, int mode, unsigned num_targets);
void dm_table_get(struct dm_table *t);
void dm_table_put(struct dm_table *t);
struct hash_cell *hc;
struct dm_table *t;
- r = dm_table_create(&t, get_mode(param));
+ r = dm_table_create(&t, get_mode(param), param->target_count);
if (r)
return r;
#define DM_VERSION_MAJOR 4
#define DM_VERSION_MINOR 0
-#define DM_VERSION_PATCHLEVEL 2
-#define DM_VERSION_EXTRA "-ioctl-cvs (2003-08-19)"
+#define DM_VERSION_PATCHLEVEL 3
+#define DM_VERSION_EXTRA "-ioctl-cvs (2003-08-22)"
/* Status bits */
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
+
+#define DM_VERSION_MAJOR 4
+#define DM_VERSION_MINOR 0
-+#define DM_VERSION_PATCHLEVEL 2
-+#define DM_VERSION_EXTRA "-ioctl (2003-08-19)"
++#define DM_VERSION_PATCHLEVEL 3
++#define DM_VERSION_EXTRA "-ioctl (2003-08-22)"
+
+/* Status bits */
+#define DM_READONLY_FLAG (1 << 0) /* In/Out */
+#define DM_BUFFER_FULL_FLAG (1 << 8) /* Out */
+
+#endif /* _LINUX_DM_IOCTL_H */
+Supply #targets when creating a table to avoid needing to extend it later.
+--- linux-2.4.20/drivers/md/dm-ioctl.c Mon Aug 18 21:24:26 2003
++++ linux/drivers/md/dm-ioctl.c Fri Aug 22 13:49:01 2003
+@@ -764,7 +764,7 @@
+ struct hash_cell *hc;
+ struct dm_table *t;
+
+- r = dm_table_create(&t, get_mode(param));
++ r = dm_table_create(&t, get_mode(param), param->target_count);
+ if (r)
+ return r;
+
+--- linux-2.4.20/drivers/md/dm-table.c Tue Aug 19 15:43:50 2003
++++ linux/drivers/md/dm-table.c Fri Aug 22 14:48:50 2003
+@@ -148,7 +148,7 @@
+ return 0;
+ }
+
+-int dm_table_create(struct dm_table **result, int mode)
++int dm_table_create(struct dm_table **result, int mode, unsigned num_targets)
+ {
+ struct dm_table *t = kmalloc(sizeof(*t), GFP_NOIO);
+
+@@ -159,8 +159,10 @@
+ INIT_LIST_HEAD(&t->devices);
+ atomic_set(&t->holders, 1);
+
+- /* allocate a single nodes worth of targets to begin with */
+- if (alloc_targets(t, KEYS_PER_NODE)) {
++ if (!num_targets)
++ num_targets = KEYS_PER_NODE;
++
++ if (alloc_targets(t, num_targets)) {
+ kfree(t);
+ t = NULL;
+ return -ENOMEM;
+--- linux-2.4.20/drivers/md/dm.h Sat Jul 12 17:06:52 2003
++++ linux/drivers/md/dm.h Fri Aug 22 13:50:19 2003
+@@ -96,7 +96,7 @@
+ * Functions for manipulating a table. Tables are also reference
+ * counted.
+ *---------------------------------------------------------------*/
+-int dm_table_create(struct dm_table **result, int mode);
++int dm_table_create(struct dm_table **result, int mode, unsigned num_targets);
+
+ void dm_table_get(struct dm_table *t);
+ void dm_table_put(struct dm_table *t);
+
+#define DM_VERSION_MAJOR 4
+#define DM_VERSION_MINOR 0
-+#define DM_VERSION_PATCHLEVEL 2
-+#define DM_VERSION_EXTRA "-ioctl (2003-08-19)"
++#define DM_VERSION_PATCHLEVEL 3
++#define DM_VERSION_EXTRA "-ioctl (2003-08-22)"
+
+/* Status bits */
+#define DM_READONLY_FLAG (1 << 0) /* In/Out */
+#define DM_BUFFER_FULL_FLAG (1 << 8) /* Out */
+
+#endif /* _LINUX_DM_IOCTL_H */
+Supply #targets when creating a table to avoid needing to extend it later.
+--- linux-2.4.21/drivers/md/dm-ioctl.c Mon Aug 18 21:24:26 2003
++++ linux/drivers/md/dm-ioctl.c Fri Aug 22 13:49:01 2003
+@@ -764,7 +764,7 @@
+ struct hash_cell *hc;
+ struct dm_table *t;
+
+- r = dm_table_create(&t, get_mode(param));
++ r = dm_table_create(&t, get_mode(param), param->target_count);
+ if (r)
+ return r;
+
+--- linux-2.4.21/drivers/md/dm-table.c Tue Aug 19 15:43:50 2003
++++ linux/drivers/md/dm-table.c Fri Aug 22 14:48:50 2003
+@@ -148,7 +148,7 @@
+ return 0;
+ }
+
+-int dm_table_create(struct dm_table **result, int mode)
++int dm_table_create(struct dm_table **result, int mode, unsigned num_targets)
+ {
+ struct dm_table *t = kmalloc(sizeof(*t), GFP_NOIO);
+
+@@ -159,8 +159,10 @@
+ INIT_LIST_HEAD(&t->devices);
+ atomic_set(&t->holders, 1);
+
+- /* allocate a single nodes worth of targets to begin with */
+- if (alloc_targets(t, KEYS_PER_NODE)) {
++ if (!num_targets)
++ num_targets = KEYS_PER_NODE;
++
++ if (alloc_targets(t, num_targets)) {
+ kfree(t);
+ t = NULL;
+ return -ENOMEM;
+--- linux-2.4.21/drivers/md/dm.h Sat Jul 12 17:06:52 2003
++++ linux/drivers/md/dm.h Fri Aug 22 13:50:19 2003
+@@ -96,7 +96,7 @@
+ * Functions for manipulating a table. Tables are also reference
+ * counted.
+ *---------------------------------------------------------------*/
+-int dm_table_create(struct dm_table **result, int mode);
++int dm_table_create(struct dm_table **result, int mode, unsigned num_targets);
+
+ void dm_table_get(struct dm_table *t);
+ void dm_table_put(struct dm_table *t);
+
+#define DM_VERSION_MAJOR 4
+#define DM_VERSION_MINOR 0
-+#define DM_VERSION_PATCHLEVEL 2
-+#define DM_VERSION_EXTRA "-ioctl (2003-08-19)"
++#define DM_VERSION_PATCHLEVEL 3
++#define DM_VERSION_EXTRA "-ioctl (2003-08-22)"
+
+/* Status bits */
+#define DM_READONLY_FLAG (1 << 0) /* In/Out */
+
+ return addr;
+}
+Supply #targets when creating a table to avoid needing to extend it later.
+--- linux-2.4.20/drivers/md/dm-ioctl.c Mon Aug 18 21:24:26 2003
++++ linux/drivers/md/dm-ioctl.c Fri Aug 22 13:49:01 2003
+@@ -764,7 +764,7 @@
+ struct hash_cell *hc;
+ struct dm_table *t;
+
+- r = dm_table_create(&t, get_mode(param));
++ r = dm_table_create(&t, get_mode(param), param->target_count);
+ if (r)
+ return r;
+
+--- linux-2.4.20/drivers/md/dm-table.c Tue Aug 19 15:43:50 2003
++++ linux/drivers/md/dm-table.c Fri Aug 22 14:48:50 2003
+@@ -148,7 +148,7 @@
+ return 0;
+ }
+
+-int dm_table_create(struct dm_table **result, int mode)
++int dm_table_create(struct dm_table **result, int mode, unsigned num_targets)
+ {
+ struct dm_table *t = kmalloc(sizeof(*t), GFP_NOIO);
+
+@@ -159,8 +159,10 @@
+ INIT_LIST_HEAD(&t->devices);
+ atomic_set(&t->holders, 1);
+
+- /* allocate a single nodes worth of targets to begin with */
+- if (alloc_targets(t, KEYS_PER_NODE)) {
++ if (!num_targets)
++ num_targets = KEYS_PER_NODE;
++
++ if (alloc_targets(t, num_targets)) {
+ kfree(t);
+ t = NULL;
+ return -ENOMEM;
+--- linux-2.4.20/drivers/md/dm.h Sat Jul 12 17:06:52 2003
++++ linux/drivers/md/dm.h Fri Aug 22 13:50:19 2003
+@@ -96,7 +96,7 @@
+ * Functions for manipulating a table. Tables are also reference
+ * counted.
+ *---------------------------------------------------------------*/
+-int dm_table_create(struct dm_table **result, int mode);
++int dm_table_create(struct dm_table **result, int mode, unsigned num_targets);
+
+ void dm_table_get(struct dm_table *t);
+ void dm_table_put(struct dm_table *t);
+
+#define DM_VERSION_MAJOR 4
+#define DM_VERSION_MINOR 0
-+#define DM_VERSION_PATCHLEVEL 2
-+#define DM_VERSION_EXTRA "-ioctl (2003-08-19)"
++#define DM_VERSION_PATCHLEVEL 3
++#define DM_VERSION_EXTRA "-ioctl (2003-08-22)"
+
+/* Status bits */
+#define DM_READONLY_FLAG (1 << 0) /* In/Out */
+
+ return addr;
+}
+Supply #targets when creating a table to avoid needing to extend it later.
+--- linux-2.4.21/drivers/md/dm-ioctl.c Mon Aug 18 21:24:26 2003
++++ linux/drivers/md/dm-ioctl.c Fri Aug 22 13:49:01 2003
+@@ -764,7 +764,7 @@
+ struct hash_cell *hc;
+ struct dm_table *t;
+
+- r = dm_table_create(&t, get_mode(param));
++ r = dm_table_create(&t, get_mode(param), param->target_count);
+ if (r)
+ return r;
+
+--- linux-2.4.21/drivers/md/dm-table.c Tue Aug 19 15:43:50 2003
++++ linux/drivers/md/dm-table.c Fri Aug 22 14:48:50 2003
+@@ -148,7 +148,7 @@
+ return 0;
+ }
+
+-int dm_table_create(struct dm_table **result, int mode)
++int dm_table_create(struct dm_table **result, int mode, unsigned num_targets)
+ {
+ struct dm_table *t = kmalloc(sizeof(*t), GFP_NOIO);
+
+@@ -159,8 +159,10 @@
+ INIT_LIST_HEAD(&t->devices);
+ atomic_set(&t->holders, 1);
+
+- /* allocate a single nodes worth of targets to begin with */
+- if (alloc_targets(t, KEYS_PER_NODE)) {
++ if (!num_targets)
++ num_targets = KEYS_PER_NODE;
++
++ if (alloc_targets(t, num_targets)) {
+ kfree(t);
+ t = NULL;
+ return -ENOMEM;
+--- linux-2.4.21/drivers/md/dm.h Sat Jul 12 17:06:52 2003
++++ linux/drivers/md/dm.h Fri Aug 22 13:50:19 2003
+@@ -96,7 +96,7 @@
+ * Functions for manipulating a table. Tables are also reference
+ * counted.
+ *---------------------------------------------------------------*/
+-int dm_table_create(struct dm_table **result, int mode);
++int dm_table_create(struct dm_table **result, int mode, unsigned num_targets);
+
+ void dm_table_get(struct dm_table *t);
+ void dm_table_put(struct dm_table *t);