mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dm-kcopyd: Correctly free requests
@ 2011-08-26 10:15 Bastian Blank
  2011-08-26 10:37 ` [dm-devel] " Alasdair G Kergon
  0 siblings, 1 reply; 3+ messages in thread
From: Bastian Blank @ 2011-08-26 10:15 UTC (permalink / raw)
  To: dm-devel; +Cc: linux-kernel

kcopyd only frees the requests if the master job information is set up
correctly, but it was not in the recently added path. This leads to many
unfreed slabs during snapshot usage.

Signed-off-by: Bastian Blank <waldi@debian.org>
Tested-by: Andreas Barth <aba@not.so.argh.org>

diff --git a/drivers/md/dm-kcopyd.c b/drivers/md/dm-kcopyd.c
index f821470..32ac708 100644
--- a/drivers/md/dm-kcopyd.c
+++ b/drivers/md/dm-kcopyd.c
@@ -628,6 +628,7 @@ void *dm_kcopyd_prepare_callback(struct dm_kcopyd_client *kc,
 	job->kc = kc;
 	job->fn = fn;
 	job->context = context;
+	job->master_job = job;
 
 	atomic_inc(&kc->nr_jobs);
 
-- 
Landru! Guide us!
		-- A Beta 3-oid, "The Return of the Archons", stardate 3157.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dm-devel] [PATCH] dm-kcopyd: Correctly free requests
  2011-08-26 10:15 [PATCH] dm-kcopyd: Correctly free requests Bastian Blank
@ 2011-08-26 10:37 ` Alasdair G Kergon
  2011-08-26 10:43   ` Alasdair G Kergon
  0 siblings, 1 reply; 3+ messages in thread
From: Alasdair G Kergon @ 2011-08-26 10:37 UTC (permalink / raw)
  To: dm-devel; +Cc: linux-kernel

On Fri, Aug 26, 2011 at 12:15:42PM +0200, Bastian Blank wrote:
> kcopyd only frees the requests if the master job information is set up
> correctly, but it was not in the recently added path. This leads to many
> unfreed slabs during snapshot usage.
 
Referring to commit c6ea41fbbe08f270a8edef99dc369faf809d1bd6
  dm kcopyd: preallocate sub jobs to avoid deadlock
which added the master_job field.

Alasdair


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dm-devel] [PATCH] dm-kcopyd: Correctly free requests
  2011-08-26 10:37 ` [dm-devel] " Alasdair G Kergon
@ 2011-08-26 10:43   ` Alasdair G Kergon
  0 siblings, 0 replies; 3+ messages in thread
From: Alasdair G Kergon @ 2011-08-26 10:43 UTC (permalink / raw)
  To: dm-devel; +Cc: linux-kernel

On Fri, Aug 26, 2011 at 11:37:47AM +0100, Alasdair G Kergon wrote:
> On Fri, Aug 26, 2011 at 12:15:42PM +0200, Bastian Blank wrote:
> > kcopyd only frees the requests if the master job information is set up
> > correctly, but it was not in the recently added path. This leads to many
> > unfreed slabs during snapshot usage.
> Referring to commit c6ea41fbbe08f270a8edef99dc369faf809d1bd6
>   dm kcopyd: preallocate sub jobs to avoid deadlock
> which added the master_job field.
 
and commit a6e50b409d3f9e0833e69c3c9cca822e8fa4adbb
    dm snapshot: skip reading origin when overwriting complete chunk
which indeed forgets to set the new field.

I'll submit the patch shortly, together with some other minor fixes
sitting in linux-next.

Alasdair


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-26 10:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-26 10:15 [PATCH] dm-kcopyd: Correctly free requests Bastian Blank
2011-08-26 10:37 ` [dm-devel] " Alasdair G Kergon
2011-08-26 10:43   ` Alasdair G Kergon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®