]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
md/bitmap: make sure reshape request are reflected in superblock.
authorNeilBrown <neilb@suse.de>
Tue, 24 Apr 2012 00:57:58 +0000 (10:57 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 24 Apr 2012 00:57:58 +0000 (10:57 +1000)
As a reshape may change the sync_size and/or chunk_size, we need
to update these whenever we write out the bitmap superblock.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/bitmap.c

index dd7d8a379d3b73a7eaca841e45cd784b6cae071c..d4f2b8e2548fe7da9734de725d1965cc8ef2c261 100644 (file)
@@ -420,6 +420,9 @@ void bitmap_update_sb(struct bitmap *bitmap)
        /* Just in case these have been changed via sysfs: */
        sb->daemon_sleep = cpu_to_le32(bitmap->mddev->bitmap_info.daemon_sleep/HZ);
        sb->write_behind = cpu_to_le32(bitmap->mddev->bitmap_info.max_write_behind);
+       /* This might have been changed by a reshape */
+       sb->sync_size = cpu_to_le64(bitmap->mddev->resync_max_sectors);
+       sb->chunksize = cpu_to_le32(bitmap->mddev->bitmap_info.chunksize);
        kunmap_atomic(sb);
        write_page(bitmap, bitmap->storage.sb_page, 1);
 }