From patchwork Wed Mar 18 23:14:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikulas Patocka X-Patchwork-Id: 12987 X-Patchwork-Delegate: agk@redhat.com Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2INEBOY022588 for ; Wed, 18 Mar 2009 23:14:11 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id A57B361A498; Wed, 18 Mar 2009 19:14:11 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n2INE9iC031636 for ; Wed, 18 Mar 2009 19:14:09 -0400 Received: from hs20-bc2-1.build.redhat.com (hs20-bc2-1.build.redhat.com [10.10.28.34]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n2INEAcs013865; Wed, 18 Mar 2009 19:14:10 -0400 Received: from hs20-bc2-1.build.redhat.com (localhost.localdomain [127.0.0.1]) by hs20-bc2-1.build.redhat.com (8.13.1/8.13.1) with ESMTP id n2INE82E025928; Wed, 18 Mar 2009 19:14:08 -0400 Received: from localhost (mpatocka@localhost) by hs20-bc2-1.build.redhat.com (8.13.1/8.13.1/Submit) with ESMTP id n2INE84e025922; Wed, 18 Mar 2009 19:14:08 -0400 X-Authentication-Warning: hs20-bc2-1.build.redhat.com: mpatocka owned process doing -bs Date: Wed, 18 Mar 2009 19:14:08 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@hs20-bc2-1.build.redhat.com To: Alasdair G Kergon In-Reply-To: <20090317203838.GQ3063@agk.fab.redhat.com> Message-ID: References: <20090316190642.GH5098@agk.fab.redhat.com> <20090317203838.GQ3063@agk.fab.redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com Subject: [dm-devel] [PATCH 1/3] kcopyd+snapshots race condition X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com Use variable to point to kcopyd client. This will be needed for further patches. Signed-off-by: Mikulas Patocka --- drivers/md/dm-kcopyd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel Index: linux-2.6.29-rc8-devel/drivers/md/dm-kcopyd.c =================================================================== --- linux-2.6.29-rc8-devel.orig/drivers/md/dm-kcopyd.c 2009-03-18 20:27:00.000000000 +0100 +++ linux-2.6.29-rc8-devel/drivers/md/dm-kcopyd.c 2009-03-18 20:27:22.000000000 +0100 @@ -461,6 +461,7 @@ static void segment_complete(int read_er sector_t progress = 0; sector_t count = 0; struct kcopyd_job *job = (struct kcopyd_job *) context; + struct dm_kcopyd_client *kc = job->kc; mutex_lock(&job->lock); @@ -490,7 +491,7 @@ static void segment_complete(int read_er if (count) { int i; - struct kcopyd_job *sub_job = mempool_alloc(job->kc->job_pool, + struct kcopyd_job *sub_job = mempool_alloc(kc->job_pool, GFP_NOIO); *sub_job = *job;