During I was creating patch, I found the ExamineBitmap() has memory leak issue. I am not sure whether the leak issue should be fixed. (Because when mdadm cmd finish, all leaked memory will be released). The IsBitmapDirty() used some of ExamineBitmap() code, and I only fixed leaked issue in IsBitmapDirty(). Thanks, heming On 7/22/20 3:11 PM, Zhao Heming wrote: > After kernel md module commit 480523feae581, in md-cluster 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> > --- > v2: > - Detail.c: change to read only one device. > - bitmap.c: modify IsBitmapDirty() to check all bitmap on the selected device. >