Lines Matching defs:store

210 	struct bitmap_storage *store = &bitmap->storage;
220 if (page->index == store->file_pages-1) {
221 int last_page_size = store->bytes & (PAGE_SIZE-1);
741 static inline unsigned long file_page_index(struct bitmap_storage *store,
744 if (store->sb_page)
750 static inline unsigned long file_page_offset(struct bitmap_storage *store,
753 if (store->sb_page)
762 static inline struct page *filemap_get_page(struct bitmap_storage *store,
765 if (file_page_index(store, chunk) >= store->file_pages)
767 return store->filemap[file_page_index(store, chunk)];
770 static int md_bitmap_storage_alloc(struct bitmap_storage *store,
785 store->filemap = kmalloc_array(num_pages, sizeof(struct page *),
787 if (!store->filemap)
790 if (with_super && !store->sb_page) {
791 store->sb_page = alloc_page(GFP_KERNEL|__GFP_ZERO);
792 if (store->sb_page == NULL)
797 if (store->sb_page) {
798 store->filemap[0] = store->sb_page;
800 store->sb_page->index = offset;
804 store->filemap[pnum] = alloc_page(GFP_KERNEL|__GFP_ZERO);
805 if (!store->filemap[pnum]) {
806 store->file_pages = pnum;
809 store->filemap[pnum]->index = pnum + offset;
811 store->file_pages = pnum;
815 store->filemap_attr = kzalloc(
818 if (!store->filemap_attr)
821 store->bytes = bytes;
826 static void md_bitmap_file_unmap(struct bitmap_storage *store)
832 file = store->file;
833 map = store->filemap;
834 pages = store->file_pages;
835 sb_page = store->sb_page;
841 kfree(store->filemap_attr);
925 struct bitmap_storage *store = &bitmap->storage;
929 node_offset = bitmap->cluster_slot * store->file_pages;
954 struct bitmap_storage *store = &bitmap->storage;
958 node_offset = bitmap->cluster_slot * store->file_pages;
1059 struct bitmap_storage *store = &bitmap->storage;
1062 file = store->file;
1066 store->filemap = NULL;
1067 store->file_pages = 0;
1083 if (file && i_size_read(file->f_mapping->host) < store->bytes) {
1087 store->bytes);
1097 node_offset = bitmap->cluster_slot * (DIV_ROUND_UP(store->bytes, PAGE_SIZE));
1106 if (index == store->file_pages-1)
1107 count = store->bytes - index * PAGE_SIZE;
1110 page = store->filemap[index];
1162 bmname(bitmap), store->file_pages,
2069 struct bitmap_storage store;
2116 memset(&store, 0, sizeof(store));
2118 ret = md_bitmap_storage_alloc(&store, chunks,
2123 md_bitmap_file_unmap(&store);
2132 md_bitmap_file_unmap(&store);
2139 store.file = bitmap->storage.file;
2142 if (store.sb_page && bitmap->storage.sb_page)
2143 memcpy(page_address(store.sb_page),
2148 bitmap->storage = store;