dm-kcopyd: Correctly free requests
PATCH 1/1 dm-kcopyd: Correctly free requests
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.
drivers/md/dm-kcopyd.c +1 -0
@@ -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);
Signature · 2 lines
Landru! Guide us! -- A Beta 3-oid, "The Return of the Archons", stardate 3157.4
Alasdair G Kergon
maintainerQuoted 3 lines · Bastian Blank
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
Alasdair G Kergon
maintainerQuoted 7 lines · Alasdair G Kergon
Quoted 3 lines · Bastian Blank
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 themaster_jobfield.
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