Lines Matching refs:zpool

28 #include <linux/zpool.h>
102 /* Compressed storage zpool to use */
110 module_param_cb(zpool, &zswap_zpool_param_ops, &zswap_zpool_type, 0644);
131 struct zpool *zpool;
158 * handle - zpool allocation handle that stores the compressed page data
193 /* pool counter to provide unique names to zpool */
211 zpool_get_type((p)->zpool))
213 static int zswap_writeback_entry(struct zpool *pool, unsigned long handle);
242 total += zpool_get_total_size(pool->zpool);
337 * Carries out the common pattern of freeing and entry's zpool allocation,
345 zpool_free(entry->pool->zpool, entry->handle);
510 if (strcmp(zpool_get_type(pool->zpool), type))
526 if (zpool_shrink(pool->zpool, 1, NULL))
556 pool->zpool = zpool_create_pool(type, name, gfp, &zswap_zpool_ops);
557 if (!pool->zpool) {
558 pr_err("%s zpool not available\n", type);
561 pr_debug("using %s zpool\n", zpool_get_type(pool->zpool));
589 if (pool->zpool)
590 zpool_destroy_pool(pool->zpool);
618 pr_err("zpool %s not available, using default %s\n",
625 pr_err("default zpool %s not available\n",
643 zpool_destroy_pool(pool->zpool);
721 pr_err("zpool %s not available\n", s);
774 * failed, maybe both compressor and zpool params were bad.
871 static int zswap_writeback_entry(struct zpool *pool, unsigned long handle)
1106 hlen = zpool_evictable(entry->pool->zpool) ? sizeof(zhdr) : 0;
1108 if (zpool_malloc_support_movable(entry->pool->zpool))
1110 ret = zpool_malloc(entry->pool->zpool, hlen + dlen, gfp, &handle);
1119 buf = zpool_map_handle(entry->pool->zpool, handle, ZPOOL_MM_RW);
1122 zpool_unmap_handle(entry->pool->zpool, handle);
1191 if (!zpool_can_sleep_mapped(entry->pool->zpool)) {
1201 src = zpool_map_handle(entry->pool->zpool, entry->handle, ZPOOL_MM_RO);
1202 if (zpool_evictable(entry->pool->zpool))
1205 if (!zpool_can_sleep_mapped(entry->pool->zpool)) {
1208 zpool_unmap_handle(entry->pool->zpool, entry->handle);
1217 if (zpool_can_sleep_mapped(entry->pool->zpool))
1218 zpool_unmap_handle(entry->pool->zpool, entry->handle);
1382 zpool_get_type(pool->zpool));