Lines Matching refs:storage
217 struct bitmap_storage *store = &bitmap->storage; in write_sb_page()
292 if (bitmap->storage.file == NULL) { in write_page()
428 if (bitmap->storage.file) in md_bitmap_wait_writes()
452 if (!bitmap->storage.sb_page) /* no superblock */ in md_bitmap_update_sb()
454 sb = kmap_atomic(bitmap->storage.sb_page); in md_bitmap_update_sb()
475 write_page(bitmap, bitmap->storage.sb_page, 1); in md_bitmap_update_sb()
484 if (!bitmap || !bitmap->storage.sb_page) in md_bitmap_print_sb()
486 sb = kmap_atomic(bitmap->storage.sb_page); in md_bitmap_print_sb()
524 bitmap->storage.sb_page = alloc_page(GFP_KERNEL | __GFP_ZERO); in md_bitmap_new_disk_sb()
525 if (bitmap->storage.sb_page == NULL) in md_bitmap_new_disk_sb()
527 bitmap->storage.sb_page->index = 0; in md_bitmap_new_disk_sb()
529 sb = kmap_atomic(bitmap->storage.sb_page); in md_bitmap_new_disk_sb()
590 if (!bitmap->storage.file && !bitmap->mddev->bitmap_info.offset) { in md_bitmap_read_sb()
602 bitmap->storage.sb_page = sb_page; in md_bitmap_read_sb()
620 if (bitmap->storage.file) { in md_bitmap_read_sb()
621 loff_t isize = i_size_read(bitmap->storage.file->f_mapping->host); in md_bitmap_read_sb()
624 err = read_page(bitmap->storage.file, 0, in md_bitmap_read_sb()
871 if (bitmap->storage.file) { in md_bitmap_file_kick()
874 ptr = file_path(bitmap->storage.file, in md_bitmap_file_kick()
897 set_bit((pnum<<2) + attr, bitmap->storage.filemap_attr); in set_page_attr()
903 clear_bit((pnum<<2) + attr, bitmap->storage.filemap_attr); in clear_page_attr()
909 return test_bit((pnum<<2) + attr, bitmap->storage.filemap_attr); in test_page_attr()
916 bitmap->storage.filemap_attr); in test_and_clear_page_attr()
931 struct bitmap_storage *store = &bitmap->storage; in md_bitmap_file_set_bit()
937 page = filemap_get_page(&bitmap->storage, chunk); in md_bitmap_file_set_bit()
940 bit = file_page_offset(&bitmap->storage, chunk); in md_bitmap_file_set_bit()
960 struct bitmap_storage *store = &bitmap->storage; in md_bitmap_file_clear_bit()
966 page = filemap_get_page(&bitmap->storage, chunk); in md_bitmap_file_clear_bit()
969 bit = file_page_offset(&bitmap->storage, chunk); in md_bitmap_file_clear_bit()
990 page = filemap_get_page(&bitmap->storage, chunk); in md_bitmap_file_test_bit()
993 bit = file_page_offset(&bitmap->storage, chunk); in md_bitmap_file_test_bit()
1013 if (!bitmap || !bitmap->storage.filemap || in md_bitmap_unplug()
1019 for (i = 0; i < bitmap->storage.file_pages; i++) { in md_bitmap_unplug()
1031 write_page(bitmap, bitmap->storage.filemap[i], 0); in md_bitmap_unplug()
1065 struct bitmap_storage *store = &bitmap->storage; in md_bitmap_init_from_disk()
1107 index = file_page_index(&bitmap->storage, i); in md_bitmap_init_from_disk()
1108 bit = file_page_offset(&bitmap->storage, i); in md_bitmap_init_from_disk()
1186 if (!bitmap || !bitmap->storage.filemap) in md_bitmap_write_all()
1188 if (bitmap->storage.file) in md_bitmap_write_all()
1192 for (i = 0; i < bitmap->storage.file_pages; i++) in md_bitmap_write_all()
1262 for (j = 0; j < bitmap->storage.file_pages; j++) in md_bitmap_daemon_work()
1274 if (bitmap->storage.filemap) { in md_bitmap_daemon_work()
1275 sb = kmap_atomic(bitmap->storage.sb_page); in md_bitmap_daemon_work()
1330 j < bitmap->storage.file_pages in md_bitmap_daemon_work()
1337 if (bitmap->storage.filemap && in md_bitmap_daemon_work()
1340 write_page(bitmap, bitmap->storage.filemap[j], 0); in md_bitmap_daemon_work()
1754 md_bitmap_file_unmap(&bitmap->storage); in md_bitmap_free()
1850 bitmap->storage.file = file; in md_bitmap_create()
2012 for (i = 0; i < bitmap->storage.file_pages; i++) in md_bitmap_copy_from_slot()
2046 if (bitmap->storage.file) { in md_bitmap_status()
2048 seq_file_path(seq, bitmap->storage.file, " \t\n"); in md_bitmap_status()
2077 if (bitmap->storage.file && !init) { in md_bitmap_resize()
2137 store.file = bitmap->storage.file; in md_bitmap_resize()
2138 bitmap->storage.file = NULL; in md_bitmap_resize()
2140 if (store.sb_page && bitmap->storage.sb_page) in md_bitmap_resize()
2142 page_address(bitmap->storage.sb_page), in md_bitmap_resize()
2145 md_bitmap_file_unmap(&bitmap->storage); in md_bitmap_resize()
2146 bitmap->storage = store; in md_bitmap_resize()
2247 for (i = 0; i < bitmap->storage.file_pages; i++) in md_bitmap_resize()
2403 sectors < (mddev->bitmap->storage.bytes + 511) >> 9) in space_store()