Lines Matching refs:zpool
20 struct zpool { struct
86 struct zpool *zpool; in zpool_evict() local
89 list_for_each_entry(zpool, &pools_head, list) { in zpool_evict()
90 if (zpool->pool == pool) { in zpool_evict()
92 if (!zpool->ops || !zpool->ops->evict) in zpool_evict()
94 return zpool->ops->evict(zpool, handle); in zpool_evict()
144 struct zpool *zpool_create_pool(char *type, char *name, gfp_t gfp, in zpool_create_pool()
148 struct zpool *zpool; in zpool_create_pool() local
164 zpool = kmalloc(sizeof(*zpool), gfp); in zpool_create_pool()
165 if (!zpool) { in zpool_create_pool()
171 zpool->type = driver->type; in zpool_create_pool()
172 zpool->driver = driver; in zpool_create_pool()
173 zpool->pool = driver->create(name, gfp, ops); in zpool_create_pool()
174 zpool->ops = ops; in zpool_create_pool()
176 if (!zpool->pool) { in zpool_create_pool()
179 kfree(zpool); in zpool_create_pool()
186 list_add(&zpool->list, &pools_head); in zpool_create_pool()
189 return zpool; in zpool_create_pool()
203 void zpool_destroy_pool(struct zpool *zpool) in zpool_destroy_pool() argument
205 pr_info("destroying pool type %s\n", zpool->type); in zpool_destroy_pool()
208 list_del(&zpool->list); in zpool_destroy_pool()
210 zpool->driver->destroy(zpool->pool); in zpool_destroy_pool()
211 zpool_put_driver(zpool->driver); in zpool_destroy_pool()
212 kfree(zpool); in zpool_destroy_pool()
225 char *zpool_get_type(struct zpool *zpool) in zpool_get_type() argument
227 return zpool->type; in zpool_get_type()
246 int zpool_malloc(struct zpool *zpool, size_t size, gfp_t gfp, in zpool_malloc() argument
249 return zpool->driver->malloc(zpool->pool, size, gfp, handle); in zpool_malloc()
266 void zpool_free(struct zpool *zpool, unsigned long handle) in zpool_free() argument
268 zpool->driver->free(zpool->pool, handle); in zpool_free()
288 int zpool_shrink(struct zpool *zpool, unsigned int pages, in zpool_shrink() argument
291 return zpool->driver->shrink(zpool->pool, pages, reclaimed); in zpool_shrink()
316 void *zpool_map_handle(struct zpool *zpool, unsigned long handle, in zpool_map_handle() argument
319 return zpool->driver->map(zpool->pool, handle, mapmode); in zpool_map_handle()
332 void zpool_unmap_handle(struct zpool *zpool, unsigned long handle) in zpool_unmap_handle() argument
334 zpool->driver->unmap(zpool->pool, handle); in zpool_unmap_handle()
345 u64 zpool_get_total_size(struct zpool *zpool) in zpool_get_total_size() argument
347 return zpool->driver->total_size(zpool->pool); in zpool_get_total_size()