On 10/24/20 5:43 AM, Zhao Heming wrote: > After kernel md module commit 480523feae581, in clustered env, > mddev->in_sync always zero, it will make array.state never set > up MD_SB_CLEAN. it causes "mdadm -D /dev/mdX" show state 'active' > all the time. > > bitmap.c: add a new API IsBitmapDirty() to support inquiry bitmap > dirty or clean. > > Signed-off-by: Zhao Heming <heming.zhao@xxxxxxxx> > --- > v5: (polish code) > - Detail.c: change code logic to only examine valid dev. > - bitmap.c: redesign bitmap_file_open() to support fd reuse. It won't > make dev multi-opened in clusterd env. > v4: > - Detail.c: follow Jes comment, split if into 2 lines. > v3: > - Detail.c: fix error logic: v2 code didn't check bitmap when dv is > null. > v2: > - Detail.c: follow Neil comments, change to read only one device. > - bitmap.c: follow Neil comments, modify IsBitmapDirty() to check all > bitmap on the selected device. > > --- > Detail.c | 20 ++++++++++++++- > bitmap.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++------- > mdadm.h | 1 + > 3 files changed, 86 insertions(+), 10 deletions(-) Applied! Thanks, Jes