]> git.ipfire.org Git - thirdparty/mdadm.git/commit - Incremental.c
mdadm: set journal_clean after scanning all disks
authorSong Liu <songliubraving@fb.com>
Tue, 29 Aug 2017 16:53:02 +0000 (09:53 -0700)
committerJes Sorensen <jsorensen@fb.com>
Fri, 1 Sep 2017 15:12:16 +0000 (11:12 -0400)
commit3b8c7127558bad386c8350e039061107c9cf6cde
tree2be6900464c1117396b9b483c6acba041715ba11
parent52f6a11ec800114164a5b6866548109e0cbf8578
mdadm: set journal_clean after scanning all disks

Summary:
In Incremental.c:count_active(), max_events is tracked to show to
which devices are up to date. If a device has events==max_events+1,
getinfo_super() is called to reload the superblock from this
device. getinfo_super1() blindly set journal_clean to 0, which is
wrong.

This patch fixes this by tracking max_journal_events for all the
disks. After scanning all disks, journal_clean is set if
max_journal_events >= max_events-1.

Signed-off-by: Song Liu <songliubraving@fb.com>
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Incremental.c