Lines Matching refs:bitmap_info
220 loff_t offset = mddev->bitmap_info.offset; in write_sb_page()
428 if (bitmap->mddev->bitmap_info.external) in bitmap_update_sb()
440 sb->daemon_sleep = cpu_to_le32(bitmap->mddev->bitmap_info.daemon_sleep/HZ); in bitmap_update_sb()
441 sb->write_behind = cpu_to_le32(bitmap->mddev->bitmap_info.max_write_behind); in bitmap_update_sb()
444 sb->chunksize = cpu_to_le32(bitmap->mddev->bitmap_info.chunksize); in bitmap_update_sb()
445 sb->nodes = cpu_to_le32(bitmap->mddev->bitmap_info.nodes); in bitmap_update_sb()
447 bitmap_info.space); in bitmap_update_sb()
507 chunksize = bitmap->mddev->bitmap_info.chunksize; in bitmap_new_disk_sb()
516 daemon_sleep = bitmap->mddev->bitmap_info.daemon_sleep; in bitmap_new_disk_sb()
523 bitmap->mddev->bitmap_info.daemon_sleep = daemon_sleep; in bitmap_new_disk_sb()
529 write_behind = bitmap->mddev->bitmap_info.max_write_behind; in bitmap_new_disk_sb()
533 bitmap->mddev->bitmap_info.max_write_behind = write_behind; in bitmap_new_disk_sb()
544 bitmap->mddev->bitmap_info.nodes = 0; in bitmap_new_disk_sb()
562 loff_t offset = bitmap->mddev->bitmap_info.offset; in bitmap_read_sb()
564 if (!bitmap->storage.file && !bitmap->mddev->bitmap_info.offset) { in bitmap_read_sb()
584 bitmap->mddev->bitmap_info.chunksize >> 9); in bitmap_read_sb()
589 offset = bitmap->mddev->bitmap_info.offset + (bitmap->cluster_slot * (bm_blocks << 3)); in bitmap_read_sb()
621 strlcpy(bitmap->mddev->bitmap_info.cluster_name, in bitmap_read_sb()
675 strlcpy(bitmap->mddev->bitmap_info.cluster_name, sb->cluster_name, 64); in bitmap_read_sb()
681 bitmap->mddev->bitmap_info.chunksize = chunksize; in bitmap_read_sb()
697 bitmap->mddev->bitmap_info.chunksize = chunksize; in bitmap_read_sb()
698 bitmap->mddev->bitmap_info.daemon_sleep = daemon_sleep; in bitmap_read_sb()
699 bitmap->mddev->bitmap_info.max_write_behind = write_behind; in bitmap_read_sb()
700 bitmap->mddev->bitmap_info.nodes = nodes; in bitmap_read_sb()
701 if (bitmap->mddev->bitmap_info.space == 0 || in bitmap_read_sb()
702 bitmap->mddev->bitmap_info.space > sectors_reserved) in bitmap_read_sb()
703 bitmap->mddev->bitmap_info.space = sectors_reserved; in bitmap_read_sb()
1035 if (!file && !bitmap->mddev->bitmap_info.offset) { in bitmap_init_from_disk()
1065 if (!bitmap->mddev->bitmap_info.external) in bitmap_init_from_disk()
1089 bitmap->mddev->bitmap_info.offset, in bitmap_init_from_disk()
1204 mutex_lock(&mddev->bitmap_info.mutex); in bitmap_daemon_work()
1207 mutex_unlock(&mddev->bitmap_info.mutex); in bitmap_daemon_work()
1211 + mddev->bitmap_info.daemon_sleep)) in bitmap_daemon_work()
1232 mddev->bitmap_info.external == 0) { in bitmap_daemon_work()
1310 mddev->bitmap_info.daemon_sleep; in bitmap_daemon_work()
1311 mutex_unlock(&mddev->bitmap_info.mutex); in bitmap_daemon_work()
1369 bw, bitmap->mddev->bitmap_info.max_write_behind); in bitmap_startwrite()
1430 bitmap->mddev->bitmap_info.max_write_behind); in bitmap_endwrite()
1585 + bitmap->mddev->bitmap_info.daemon_sleep))) in bitmap_cond_end_sync()
1661 sleep = mddev->bitmap_info.daemon_sleep * 2; in bitmap_flush()
1713 mutex_lock(&mddev->bitmap_info.mutex); in bitmap_destroy()
1717 mutex_unlock(&mddev->bitmap_info.mutex); in bitmap_destroy()
1735 struct file *file = mddev->bitmap_info.file; in bitmap_create()
1741 BUG_ON(file && mddev->bitmap_info.offset); in bitmap_create()
1774 if (!mddev->bitmap_info.external) { in bitmap_create()
1785 if (mddev->bitmap_info.chunksize == 0 || in bitmap_create()
1786 mddev->bitmap_info.daemon_sleep == 0) in bitmap_create()
1795 err = bitmap_resize(bitmap, blocks, mddev->bitmap_info.chunksize, 1); in bitmap_create()
1840 mutex_lock(&mddev->bitmap_info.mutex); in bitmap_load()
1842 mutex_unlock(&mddev->bitmap_info.mutex); in bitmap_load()
1851 mddev->thread->timeout = mddev->bitmap_info.daemon_sleep; in bitmap_load()
1923 chunk_kb = bitmap->mddev->bitmap_info.chunksize >> 10; in bitmap_status()
1930 chunk_kb ? chunk_kb : bitmap->mddev->bitmap_info.chunksize, in bitmap_status()
1968 long space = bitmap->mddev->bitmap_info.space; in bitmap_resize()
1975 if (!bitmap->mddev->bitmap_info.external) in bitmap_resize()
1978 bitmap->mddev->bitmap_info.space = space; in bitmap_resize()
1987 if (!bitmap->mddev->bitmap_info.external) in bitmap_resize()
1995 if (bitmap->mddev->bitmap_info.offset || bitmap->mddev->bitmap_info.file) in bitmap_resize()
1997 !bitmap->mddev->bitmap_info.external, in bitmap_resize()
2031 bitmap->mddev->bitmap_info.chunksize = 1 << (chunkshift + in bitmap_resize()
2110 if (mddev->bitmap_info.file) in location_show()
2112 else if (mddev->bitmap_info.offset) in location_show()
2113 len = sprintf(page, "%+lld", (long long)mddev->bitmap_info.offset); in location_show()
2131 if (mddev->bitmap || mddev->bitmap_info.file || in location_store()
2132 mddev->bitmap_info.offset) { in location_store()
2141 mddev->bitmap_info.offset = 0; in location_store()
2142 if (mddev->bitmap_info.file) { in location_store()
2143 struct file *f = mddev->bitmap_info.file; in location_store()
2144 mddev->bitmap_info.file = NULL; in location_store()
2165 if (mddev->bitmap_info.external == 0 && in location_store()
2167 offset != mddev->bitmap_info.default_offset) in location_store()
2169 mddev->bitmap_info.offset = offset; in location_store()
2181 mddev->bitmap_info.offset = 0; in location_store()
2210 return sprintf(page, "%lu\n", mddev->bitmap_info.space); in space_show()
2233 mddev->bitmap_info.space = sectors; in space_store()
2244 unsigned long secs = mddev->bitmap_info.daemon_sleep / HZ; in timeout_show()
2245 unsigned long jifs = mddev->bitmap_info.daemon_sleep % HZ; in timeout_show()
2273 mddev->bitmap_info.daemon_sleep = timeout; in timeout_store()
2293 return sprintf(page, "%lu\n", mddev->bitmap_info.max_write_behind); in backlog_show()
2305 mddev->bitmap_info.max_write_behind = backlog; in backlog_store()
2315 return sprintf(page, "%lu\n", mddev->bitmap_info.chunksize); in chunksize_show()
2332 mddev->bitmap_info.chunksize = csize; in chunksize_store()
2343 return sprintf(page, "%s\n", (mddev->bitmap_info.external in metadata_show()
2350 mddev->bitmap_info.file || in metadata_store()
2351 mddev->bitmap_info.offset) in metadata_store()
2354 mddev->bitmap_info.external = 1; in metadata_store()
2357 mddev->bitmap_info.external = 0; in metadata_store()