Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1396502
| From | Shaohua Li <shli@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/3] md: set MD_CHANGE_PENDING in a atomic region |
| Date | 2016-05-09 00:20 +0200 |
| Message-ID | <rwFdo-77R-9@gated-at.bofh.it> (permalink) |
| References | <ruUJA-3iX-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, May 03, 2016 at 10:22:13PM -0400, Guoqing Jiang wrote: > Some code waits for a metadata update by: > > 1. flagging that it is needed (MD_CHANGE_DEVS or MD_CHANGE_CLEAN) > 2. setting MD_CHANGE_PENDING and waking the management thread > 3. waiting for MD_CHANGE_PENDING to be cleared > > If the first two are done without locking, the code in md_update_sb() > which checks if it needs to repeat might test if an update is needed > before step 1, then clear MD_CHANGE_PENDING after step 2, resulting > in the wait returning early. > > So make sure all places that set MD_CHANGE_PENDING are atomicial, and > bit_clear_unless (suggested by Neil) is introduced for the purpose. Applied the 3, thanks!
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/3] md: set MD_CHANGE_PENDING in a atomic region Guoqing Jiang <gqjiang@suse.com> - 2016-05-04 04:30 +0200 Re: [PATCH 1/3] md: set MD_CHANGE_PENDING in a atomic region Shaohua Li <shli@kernel.org> - 2016-05-09 00:20 +0200
csiph-web