Lines Matching refs:zpool
21 struct zpool { struct
147 struct zpool *zpool_create_pool(const char *type, const char *name, gfp_t gfp) in zpool_create_pool()
150 struct zpool *zpool; in zpool_create_pool() local
166 zpool = kmalloc(sizeof(*zpool), gfp); in zpool_create_pool()
167 if (!zpool) { in zpool_create_pool()
173 zpool->driver = driver; in zpool_create_pool()
174 zpool->pool = driver->create(name, gfp); in zpool_create_pool()
176 if (!zpool->pool) { in zpool_create_pool()
179 kfree(zpool); in zpool_create_pool()
185 return zpool; in zpool_create_pool()
199 void zpool_destroy_pool(struct zpool *zpool) in zpool_destroy_pool() argument
201 pr_debug("destroying pool type %s\n", zpool->driver->type); in zpool_destroy_pool()
203 zpool->driver->destroy(zpool->pool); in zpool_destroy_pool()
204 zpool_put_driver(zpool->driver); in zpool_destroy_pool()
205 kfree(zpool); in zpool_destroy_pool()
218 const char *zpool_get_type(struct zpool *zpool) in zpool_get_type() argument
220 return zpool->driver->type; in zpool_get_type()
234 bool zpool_malloc_support_movable(struct zpool *zpool) in zpool_malloc_support_movable() argument
236 return zpool->driver->malloc_support_movable; in zpool_malloc_support_movable()
255 int zpool_malloc(struct zpool *zpool, size_t size, gfp_t gfp, in zpool_malloc() argument
258 return zpool->driver->malloc(zpool->pool, size, gfp, handle); in zpool_malloc()
275 void zpool_free(struct zpool *zpool, unsigned long handle) in zpool_free() argument
277 zpool->driver->free(zpool->pool, handle); in zpool_free()
302 void *zpool_map_handle(struct zpool *zpool, unsigned long handle, in zpool_map_handle() argument
305 return zpool->driver->map(zpool->pool, handle, mapmode); in zpool_map_handle()
318 void zpool_unmap_handle(struct zpool *zpool, unsigned long handle) in zpool_unmap_handle() argument
320 zpool->driver->unmap(zpool->pool, handle); in zpool_unmap_handle()
331 u64 zpool_get_total_size(struct zpool *zpool) in zpool_get_total_size() argument
333 return zpool->driver->total_size(zpool->pool); in zpool_get_total_size()
349 bool zpool_can_sleep_mapped(struct zpool *zpool) in zpool_can_sleep_mapped() argument
351 return zpool->driver->sleep_mapped; in zpool_can_sleep_mapped()