Linux LVM users
 help / color / mirror / Atom feed
From: Alasdair G Kergon <agk@uk.sistina.com>
To: linux-lvm@sistina.com
Cc: dm-devel@sistina.com
Subject: Re: [linux-lvm] LVM 2.0/Device-Mapper 1.0 update
Date: Fri Aug 22 10:21:01 2003	[thread overview]
Message-ID: <20030822161605.X29420@uk.sistina.com> (raw)
In-Reply-To: <20030821201803.T29420@uk.sistina.com>; from agk@uk.sistina.com on Thu, Aug 21, 2003 at 08:18:03PM +0100

[-- Attachment #1: Type: text/plain, Size: 597 bytes --]

On Thu, Aug 21, 2003 at 08:18:03PM +0100, Alasdair Kergon wrote:
> Well, many thanks for producing all the diagnostics: 
> I don't know what's wrong yet, but I have managed to
> reproduce your setup on a test machine here and 
> I reproduced the problem 5 minutes ago.
 
I attach a patch which should workaround the problem.

Memory that is still referenced gets freed if pvmove
tries to move more than 8 LV segments at once, so all
pvmove (dm_mirror target) users should apply this patch.

It's in CVS now, and I'll update the tarball on the ftp site
to 1.00.04.

Alasdair
-- 
agk@uk.sistina.com

[-- Attachment #2: pvmove_8_segments.patch --]
[-- Type: text/plain, Size: 1572 bytes --]

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);

      reply	other threads:[~2003-08-22 10:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-20 18:06 [linux-lvm] LVM 2.0/Device-Mapper 1.0 update Alasdair G Kergon
2003-08-20 18:18 ` Dan Sully
2003-08-21  2:40   ` Joe Thornber
2003-08-30 16:54   ` Terje Kvernes
2003-08-30 17:20     ` [linux-lvm] " Måns Rullgård
2003-08-31  8:40       ` Terje Kvernes
2003-08-21 12:57 ` [linux-lvm] " Jan Niehusmann
2003-08-21 14:19   ` Alasdair G Kergon
2003-08-22 10:21     ` Alasdair G Kergon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030822161605.X29420@uk.sistina.com \
    --to=agk@uk.sistina.com \
    --cc=dm-devel@sistina.com \
    --cc=linux-lvm@sistina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox