diff options
author | Hou Tao <houtao1@huawei.com> | 2017-11-06 10:11:25 +0800 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-11-09 07:30:50 -0800 |
commit | 97f0eb9f0fec0563c1c796d95123e871b8bb65c0 (patch) | |
tree | 083bd0c08b7f665b762a84ff3142b3d62fbc4509 /drivers/md/md.c | |
parent | db0505d320660b6ad92418847e7eca6b61b246ac (diff) |
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: Hou Tao <houtao1@huawei.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/md.c')
0 files changed, 0 insertions, 0 deletions