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 153335 Details for
Bug 236432
Failures to multiple cmirrors on mulitple VGs causes problems
[?]
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]
Add locking arounf lvm calls.
lvm-thread.fix (text/plain), 2.36 KB, created by
Christine Caulfield
on 2007-04-24 09:09:12 UTC
(
hide
)
Description:
Add locking arounf lvm calls.
Filename:
MIME Type:
Creator:
Christine Caulfield
Created:
2007-04-24 09:09:12 UTC
Size:
2.36 KB
patch
obsolete
>? clvmerr.patch >? lvmwarn.patch >? patches >? daemons/clvmd/a.out >? daemons/clvmd/clname.patch >? daemons/clvmd/clvmd >? daemons/clvmd/lvmtest.c >? daemons/clvmd/run_clvmd >? daemons/clvmd/run_clvmd.c >? lib/misc/configure.h >Index: daemons/clvmd/lvm-functions.c >=================================================================== >RCS file: /cvs/lvm2/LVM2/daemons/clvmd/lvm-functions.c,v >retrieving revision 1.28 >diff -u -p -w -u -p -r1.28 lvm-functions.c >--- daemons/clvmd/lvm-functions.c 25 Jan 2007 14:37:47 -0000 1.28 >+++ daemons/clvmd/lvm-functions.c 24 Apr 2007 08:36:03 -0000 >@@ -50,6 +50,7 @@ > static struct cmd_context *cmd = NULL; > static struct dm_hash_table *lv_hash = NULL; > static pthread_mutex_t lv_hash_lock; >+static pthread_mutex_t lvm_lock; > static char last_error[1024]; > > struct lv_info { >@@ -311,10 +312,12 @@ int do_lock_lv(unsigned char command, un > DEBUGLOG("do_lock_lv: resource '%s', cmd = 0x%x, flags = %x\n", > resource, command, lock_flags); > >+ pthread_mutex_lock(&lvm_lock); > if (!cmd->config_valid || config_files_changed(cmd)) { > /* Reinitialise various settings inc. logging, filters */ > if (!refresh_toolcontext(cmd)) { > log_error("Updated config file invalid. Aborting."); >+ pthread_mutex_unlock(&lvm_lock); > return EINVAL; > } > } >@@ -367,6 +370,7 @@ int do_lock_lv(unsigned char command, un > > /* clean the pool for another command */ > dm_pool_empty(cmd->mem); >+ pthread_mutex_unlock(&lvm_lock); > > DEBUGLOG("Command return is %d\n", status); > return status; >@@ -393,6 +397,8 @@ int pre_lock_lv(unsigned char command, u > int post_lock_lv(unsigned char command, unsigned char lock_flags, > char *resource) > { >+ int status; >+ > /* Opposite of above, done on resume after a metadata update */ > if (command == LCK_LV_RESUME) { > int oldmode; >@@ -406,7 +412,10 @@ int post_lock_lv(unsigned char command, > if (oldmode == LKM_PWMODE) { > struct lvinfo lvi; > >- if (!lv_info_by_lvid(cmd, resource, &lvi, 0)) >+ pthread_mutex_lock(&lvm_lock); >+ status = lv_info_by_lvid(cmd, resource, &lvi, 0); >+ pthread_mutex_unlock(&lvm_lock); >+ if (!status) > return EIO; > > if (lvi.exists) { >@@ -572,6 +581,7 @@ void init_lvhash() > /* Create hash table for keeping LV locks & status */ > lv_hash = dm_hash_create(100); > pthread_mutex_init(&lv_hash_lock, NULL); >+ pthread_mutex_init(&lvm_lock, NULL); > } > > /* Called to initialise the LVM context of the daemon */
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 236432
:
153217
|
153283
|
153299
| 153335