Lines Matching refs:bitmap_info

216 		loff_t offset = mddev->bitmap_info.offset;
443 if (bitmap->mddev->bitmap_info.external)
459 sb->daemon_sleep = cpu_to_le32(bitmap->mddev->bitmap_info.daemon_sleep/HZ);
460 sb->write_behind = cpu_to_le32(bitmap->mddev->bitmap_info.max_write_behind);
463 sb->chunksize = cpu_to_le32(bitmap->mddev->bitmap_info.chunksize);
464 sb->nodes = cpu_to_le32(bitmap->mddev->bitmap_info.nodes);
466 bitmap_info.space);
506 * reads and verifies the on-disk bitmap superblock and populates bitmap_info.
507 * This function verifies 'bitmap_info' and populates the on-disk bitmap
527 chunksize = bitmap->mddev->bitmap_info.chunksize;
536 daemon_sleep = bitmap->mddev->bitmap_info.daemon_sleep;
542 bitmap->mddev->bitmap_info.daemon_sleep = daemon_sleep;
548 write_behind = bitmap->mddev->bitmap_info.max_write_behind;
552 bitmap->mddev->bitmap_info.max_write_behind = write_behind;
563 bitmap->mddev->bitmap_info.nodes = 0;
581 loff_t offset = bitmap->mddev->bitmap_info.offset;
583 if (!bitmap->storage.file && !bitmap->mddev->bitmap_info.offset) {
603 (bitmap->mddev->bitmap_info.chunksize >> 9));
608 offset = bitmap->mddev->bitmap_info.offset + (bitmap->cluster_slot * (bm_blocks << 3));
662 strlcpy(bitmap->mddev->bitmap_info.cluster_name,
693 strlcpy(bitmap->mddev->bitmap_info.cluster_name, sb->cluster_name, 64);
700 bitmap->mddev->bitmap_info.chunksize = chunksize;
715 bitmap->mddev->bitmap_info.chunksize = chunksize;
716 bitmap->mddev->bitmap_info.daemon_sleep = daemon_sleep;
717 bitmap->mddev->bitmap_info.max_write_behind = write_behind;
718 bitmap->mddev->bitmap_info.nodes = nodes;
719 if (bitmap->mddev->bitmap_info.space == 0 ||
720 bitmap->mddev->bitmap_info.space > sectors_reserved)
721 bitmap->mddev->bitmap_info.space = sectors_reserved;
1064 if (!file && !bitmap->mddev->bitmap_info.offset) {
1093 if (!bitmap->mddev->bitmap_info.external)
1117 bitmap->mddev->bitmap_info.offset,
1231 mutex_lock(&mddev->bitmap_info.mutex);
1234 mutex_unlock(&mddev->bitmap_info.mutex);
1238 + mddev->bitmap_info.daemon_sleep))
1263 mddev->bitmap_info.external == 0) {
1341 mddev->bitmap_info.daemon_sleep;
1342 mutex_unlock(&mddev->bitmap_info.mutex);
1408 bw, bitmap->mddev->bitmap_info.max_write_behind);
1469 bitmap->mddev->bitmap_info.max_write_behind);
1624 + bitmap->mddev->bitmap_info.daemon_sleep)))
1721 sleep = mddev->bitmap_info.daemon_sleep * 2;
1728 if (mddev->bitmap_info.external)
1797 mutex_lock(&mddev->bitmap_info.mutex);
1801 mutex_unlock(&mddev->bitmap_info.mutex);
1817 struct file *file = mddev->bitmap_info.file;
1823 BUG_ON(file && mddev->bitmap_info.offset);
1861 /* read superblock from bitmap file (this sets mddev->bitmap_info.chunksize) */
1862 if (!mddev->bitmap_info.external) {
1873 if (mddev->bitmap_info.chunksize == 0 ||
1874 mddev->bitmap_info.daemon_sleep == 0)
1883 err = md_bitmap_resize(bitmap, blocks, mddev->bitmap_info.chunksize, 1);
1915 md_cluster_ops->load_bitmaps(mddev, mddev->bitmap_info.nodes);
1935 mutex_lock(&mddev->bitmap_info.mutex);
1937 mutex_unlock(&mddev->bitmap_info.mutex);
1946 mddev->thread->timeout = mddev->bitmap_info.daemon_sleep;
2039 chunk_kb = bitmap->mddev->bitmap_info.chunksize >> 10;
2046 chunk_kb ? chunk_kb : bitmap->mddev->bitmap_info.chunksize,
2089 long space = bitmap->mddev->bitmap_info.space;
2096 if (!bitmap->mddev->bitmap_info.external)
2099 bitmap->mddev->bitmap_info.space = space;
2108 if (!bitmap->mddev->bitmap_info.external)
2117 if (bitmap->mddev->bitmap_info.offset || bitmap->mddev->bitmap_info.file)
2119 !bitmap->mddev->bitmap_info.external,
2156 bitmap->mddev->bitmap_info.chunksize = 1UL << (chunkshift +
2182 bitmap->mddev->bitmap_info.chunksize =
2268 if (mddev->bitmap_info.file)
2270 else if (mddev->bitmap_info.offset)
2271 len = sprintf(page, "%+lld", (long long)mddev->bitmap_info.offset);
2297 if (mddev->bitmap || mddev->bitmap_info.file ||
2298 mddev->bitmap_info.offset) {
2309 mddev->bitmap_info.offset = 0;
2310 if (mddev->bitmap_info.file) {
2311 struct file *f = mddev->bitmap_info.file;
2312 mddev->bitmap_info.file = NULL;
2335 if (mddev->bitmap_info.external == 0 &&
2337 offset != mddev->bitmap_info.default_offset) {
2341 mddev->bitmap_info.offset = offset;
2352 mddev->bitmap_info.offset = 0;
2388 return sprintf(page, "%lu\n", mddev->bitmap_info.space);
2411 mddev->bitmap_info.space = sectors;
2422 unsigned long secs = mddev->bitmap_info.daemon_sleep / HZ;
2423 unsigned long jifs = mddev->bitmap_info.daemon_sleep % HZ;
2451 mddev->bitmap_info.daemon_sleep = timeout;
2471 return sprintf(page, "%lu\n", mddev->bitmap_info.max_write_behind);
2478 unsigned long old_mwb = mddev->bitmap_info.max_write_behind;
2508 mddev->bitmap_info.max_write_behind = backlog;
2531 return sprintf(page, "%lu\n", mddev->bitmap_info.chunksize);
2551 mddev->bitmap_info.chunksize = csize;
2562 return sprintf(page, "%s\n", (mddev->bitmap_info.external
2569 mddev->bitmap_info.file ||
2570 mddev->bitmap_info.offset)
2573 mddev->bitmap_info.external = 1;
2576 mddev->bitmap_info.external = 0;