Lines Matching full:storage

9  * - added disk storage for bitmap
62 * a '1' bit is read from storage at startup.
195 } storage; member
237 return bitmap->storage.filemap && in __bitmap_enabled()
440 struct bitmap_storage *store = &bitmap->storage; in __write_sb_page()
441 unsigned long num_pages = bitmap->storage.file_pages; in __write_sb_page()
649 struct bitmap_storage *store = &bitmap->storage; in filemap_write_page()
670 if (bitmap->storage.file) in md_bitmap_wait_writes()
695 if (!bitmap->storage.sb_page) /* no superblock */ in bitmap_update_sb()
697 sb = kmap_local_page(bitmap->storage.sb_page); in bitmap_update_sb()
719 if (bitmap->storage.file) in bitmap_update_sb()
720 write_file_page(bitmap, bitmap->storage.sb_page, 1); in bitmap_update_sb()
722 write_sb_page(bitmap, bitmap->storage.sb_index, in bitmap_update_sb()
723 bitmap->storage.sb_page, 1); in bitmap_update_sb()
730 if (!bitmap || !bitmap->storage.sb_page) in bitmap_print_sb()
732 sb = kmap_local_page(bitmap->storage.sb_page); in bitmap_print_sb()
770 bitmap->storage.sb_page = alloc_page(GFP_KERNEL | __GFP_ZERO); in md_bitmap_new_disk_sb()
771 if (bitmap->storage.sb_page == NULL) in md_bitmap_new_disk_sb()
773 bitmap->storage.sb_index = 0; in md_bitmap_new_disk_sb()
775 sb = kmap_local_page(bitmap->storage.sb_page); in md_bitmap_new_disk_sb()
836 if (!bitmap->storage.file && !bitmap->mddev->bitmap_info.offset) { in md_bitmap_read_sb()
848 bitmap->storage.sb_page = sb_page; in md_bitmap_read_sb()
866 if (bitmap->storage.file) { in md_bitmap_read_sb()
867 loff_t isize = i_size_read(bitmap->storage.file->f_mapping->host); in md_bitmap_read_sb()
870 err = read_file_page(bitmap->storage.file, 0, in md_bitmap_read_sb()
1108 if (bitmap->storage.file) { in md_bitmap_file_kick()
1110 bmname(bitmap), bitmap->storage.file); in md_bitmap_file_kick()
1128 set_bit((pnum<<2) + attr, bitmap->storage.filemap_attr); in set_page_attr()
1134 clear_bit((pnum<<2) + attr, bitmap->storage.filemap_attr); in clear_page_attr()
1140 return test_bit((pnum<<2) + attr, bitmap->storage.filemap_attr); in test_page_attr()
1147 bitmap->storage.filemap_attr); in test_and_clear_page_attr()
1162 struct bitmap_storage *store = &bitmap->storage; in md_bitmap_file_set_bit()
1170 page = filemap_get_page(&bitmap->storage, chunk); in md_bitmap_file_set_bit()
1173 bit = file_page_offset(&bitmap->storage, chunk); in md_bitmap_file_set_bit()
1193 struct bitmap_storage *store = &bitmap->storage; in md_bitmap_file_clear_bit()
1201 page = filemap_get_page(&bitmap->storage, chunk); in md_bitmap_file_clear_bit()
1204 bit = file_page_offset(&bitmap->storage, chunk); in md_bitmap_file_clear_bit()
1225 page = filemap_get_page(&bitmap->storage, chunk); in md_bitmap_file_test_bit()
1228 bit = file_page_offset(&bitmap->storage, chunk); in md_bitmap_file_test_bit()
1252 for (i = 0; i < bitmap->storage.file_pages; i++) { in __bitmap_unplug()
1334 struct bitmap_storage *store = &bitmap->storage; in md_bitmap_init_from_disk()
1416 struct page *page = filemap_get_page(&bitmap->storage, i); in md_bitmap_init_from_disk()
1417 unsigned long bit = file_page_offset(&bitmap->storage, i); in md_bitmap_init_from_disk()
1457 if (!bitmap || !bitmap->storage.filemap) in bitmap_write_all()
1461 if (bitmap->storage.file) in bitmap_write_all()
1464 for (i = 0; i < bitmap->storage.file_pages; i++) in bitmap_write_all()
1548 for (j = 0; j < bitmap->storage.file_pages; j++) in bitmap_daemon_work()
1560 if (bitmap->storage.filemap) { in bitmap_daemon_work()
1561 sb = kmap_local_page(bitmap->storage.sb_page); in bitmap_daemon_work()
1616 j < bitmap->storage.file_pages in bitmap_daemon_work()
1623 if (bitmap->storage.filemap && in bitmap_daemon_work()
2043 md_bitmap_file_unmap(&bitmap->storage); in md_bitmap_free()
2168 bitmap->storage.file = file; in __bitmap_create()
2340 for (i = 0; i < bitmap->storage.file_pages; i++) in bitmap_copy_from_slot()
2362 struct bitmap_storage *storage; in bitmap_get_stats() local
2370 !bitmap->storage.sb_page) in bitmap_get_stats()
2372 sb = kmap_local_page(bitmap->storage.sb_page); in bitmap_get_stats()
2380 storage = &bitmap->storage; in bitmap_get_stats()
2381 stats->file_pages = storage->file_pages; in bitmap_get_stats()
2382 stats->file = storage->file; in bitmap_get_stats()
2394 * Then possibly allocate new storage space. in __bitmap_resize()
2413 if (bitmap->storage.file && !init) { in __bitmap_resize()
2473 store.file = bitmap->storage.file; in __bitmap_resize()
2474 bitmap->storage.file = NULL; in __bitmap_resize()
2476 if (store.sb_page && bitmap->storage.sb_page) in __bitmap_resize()
2478 page_address(bitmap->storage.sb_page), in __bitmap_resize()
2481 md_bitmap_file_unmap(&bitmap->storage); in __bitmap_resize()
2482 bitmap->storage = store; in __bitmap_resize()
2583 for (i = 0; i < bitmap->storage.file_pages; i++) in __bitmap_resize()
2737 if (bitmap && sectors < (bitmap->storage.bytes + 511) >> 9) in space_store()