Home
last modified time | relevance | path

Searched hist:"97 f0eb9f" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/md/
H A Dmd-bitmap.c97f0eb9f Sun Nov 05 20:11:25 CST 2017 Hou Tao <houtao1@huawei.com> 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>
97f0eb9f Sun Nov 05 20:11:25 CST 2017 Hou Tao <houtao1@huawei.com> 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>