Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 315494 Details for
Bug 460845
Nested LVM can cause deadlock due to kcopyd
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch 2/2
02-dm-kcopyd-private-mempool.patch (text/plain), 3.13 KB, created by
Mikuláš Patočka
on 2008-09-01 21:45:47 UTC
(
hide
)
Description:
patch 2/2
Filename:
MIME Type:
Creator:
Mikuláš Patočka
Created:
2008-09-01 21:45:47 UTC
Size:
3.13 KB
patch
obsolete
>diff -p -u -r linux-2.6.18.x86_64.p1/drivers/md/kcopyd.c linux-2.6.18.x86_64/drivers/md/kcopyd.c >--- linux-2.6.18.x86_64.p1/drivers/md/kcopyd.c 2008-09-01 22:33:10.000000000 +0200 >+++ linux-2.6.18.x86_64/drivers/md/kcopyd.c 2008-09-01 23:20:30.000000000 +0200 >@@ -43,6 +43,8 @@ struct kcopyd_client { > struct dm_io_client *io_client; > #endif > >+ mempool_t *job_pool; >+ > struct workqueue_struct *kcopyd_wq; > struct work_struct kcopyd_work; > >@@ -221,7 +223,6 @@ struct kcopyd_job { > #define MIN_JOBS 512 > > static kmem_cache_t *_job_cache; >-static mempool_t *_job_pool; > > static int jobs_init(void) > { >@@ -232,20 +233,12 @@ static int jobs_init(void) > if (!_job_cache) > return -ENOMEM; > >- _job_pool = mempool_create_slab_pool(MIN_JOBS, _job_cache); >- if (!_job_pool) { >- kmem_cache_destroy(_job_cache); >- return -ENOMEM; >- } >- > return 0; > } > > static void jobs_exit(void) > { >- mempool_destroy(_job_pool); > kmem_cache_destroy(_job_cache); >- _job_pool = NULL; > _job_cache = NULL; > } > >@@ -298,7 +291,7 @@ static int run_complete_job(struct kcopy > struct kcopyd_client *kc = job->kc; > > kcopyd_put_pages(kc, job->pages); >- mempool_free(job, _job_pool); >+ mempool_free(job, kc->job_pool); > fn(read_err, write_err, context); > > if (atomic_dec_and_test(&kc->nr_jobs)) >@@ -489,7 +482,8 @@ static void segment_complete(int read_er > > if (count) { > int i; >- struct kcopyd_job *sub_job = mempool_alloc(_job_pool, GFP_NOIO); >+ struct kcopyd_job *sub_job = mempool_alloc(job->kc->job_pool, >+ GFP_NOIO); > > *sub_job = *job; > sub_job->source.sector += progress; >@@ -513,7 +507,7 @@ static void segment_complete(int read_er > * after we've completed. > */ > job->fn(read_err, write_err, job->context); >- mempool_free(job, _job_pool); >+ mempool_free(job, job->kc->job_pool); > } > } > >@@ -540,7 +534,7 @@ int kcopyd_copy(struct kcopyd_client *kc > /* > * Allocate a new job. > */ >- job = mempool_alloc(_job_pool, GFP_NOIO); >+ job = mempool_alloc(kc->job_pool, GFP_NOIO); > > /* > * set up for the read. >@@ -666,10 +660,19 @@ int kcopyd_client_create(unsigned int nr > INIT_LIST_HEAD(&kc->io_jobs); > INIT_LIST_HEAD(&kc->pages_jobs); > >+ kc->job_pool = mempool_create_slab_pool(MIN_JOBS, _job_cache); >+ if (!kc->job_pool) { >+ r = -ENOMEM; >+ kfree(kc); >+ kcopyd_exit(); >+ return r; >+ } >+ > INIT_WORK(&kc->kcopyd_work, do_work, kc); > kc->kcopyd_wq = create_singlethread_workqueue("kcopyd"); > if (!kc->kcopyd_wq) { > r = -ENOMEM; >+ mempool_destroy(kc->job_pool); > kfree(kc); > kcopyd_exit(); > return r; >@@ -680,6 +683,7 @@ int kcopyd_client_create(unsigned int nr > r = client_alloc_pages(kc, nr_pages); > if (r) { > destroy_workqueue(kc->kcopyd_wq); >+ mempool_destroy(kc->job_pool); > kfree(kc); > kcopyd_exit(); > return r; >@@ -690,6 +694,7 @@ int kcopyd_client_create(unsigned int nr > r = PTR_ERR(kc->io_client); > client_free_pages(kc); > destroy_workqueue(kc->kcopyd_wq); >+ mempool_destroy(kc->job_pool); > kfree(kc); > kcopyd_exit(); > return r; >@@ -715,6 +720,7 @@ void kcopyd_client_destroy(struct kcopyd > dm_io_client_destroy(kc->io_client); > client_free_pages(kc); > client_del(kc); >+ mempool_destroy(kc->job_pool); > kfree(kc); > kcopyd_exit(); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 460845
:
315493
| 315494