Re: [PATCH 1/3] md: set MD_CHANGE_PENDING in a atomic region

2016-05-08 Thread Shaohua Li
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

[PATCH 1/3] md: set MD_CHANGE_PENDING in a atomic region

2016-05-03 Thread Guoqing Jiang
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 chec