Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 97f0eb9f authored by Hou Tao's avatar Hou Tao Committed by Shaohua Li
Browse files

md/bitmap: clear BITMAP_WRITE_ERROR bit before writing it to sb



For a RAID1 device using a file-based bitmap, if a bitmap write error
occurs but the later writes succeed, it's possible both BITMAP_STALE
and BITMAP_WRITE_ERROR bits will be written to the bitmap super block,
the BITMAP_STALE bit will be handled properly and be cleared, but the
BITMAP_WRITE_ERROR bit in sb->flags will make bitmap_create() to fail.

So clear it to protect against the write failure-and-then-recovery case.

Signed-off-by: default avatarHou Tao <houtao1@huawei.com>
Signed-off-by: default avatarShaohua Li <shli@fb.com>
parent db0505d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment