Skip to content
Commit 8031c3dd authored by Shaohua Li's avatar Shaohua Li
Browse files

md/bitmap: copy correct data for bitmap super



raid5 cache could write bitmap superblock before bitmap superblock is
initialized. The bitmap superblock is less than 512B. The current code will
only copy the superblock to a new page and write the whole 512B, which will
zero the the data after the superblock. Unfortunately the data could include
bitmap, which we should preserve. The patch will make superblock read do 4k
chunk and we always copy the 4k data to new page, so the superblock write will
old data to disk and we don't change the bitmap.

Reported-by: default avatarSong Liu <songliubraving@fb.com>
Reviewed-by: default avatarSong Liu <songliubraving@fb.com>
Cc: stable@vger.kernel.org (4.10+)
Signed-off-by: default avatarShaohua Li <shli@fb.com>
parent 143c97cc
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