Lines Matching defs:pool
7 * This is a common frontend for memory storage pool implementations.
23 void *pool;
105 * zpool_has_pool() - Check if the pool driver is available
108 * This checks if the @type pool driver is available. This will try to load
111 * true, the caller should assume the pool is available, but must be prepared
113 * returns false, the caller should assume the requested pool type is not
114 * available; either the requested pool type module does not exist, or could
115 * not be loaded, and calling @zpool_create_pool() with the pool type will
120 * Returns: true if @type pool is available, false if not
143 * @gfp: The GFP flags to use when allocating the pool.
162 pr_debug("creating pool type %s\n", type);
184 zpool->pool = driver->create(name, gfp, ops, zpool);
189 if (!zpool->pool) {
190 pr_err("couldn't create %s pool\n", type);
196 pr_debug("created pool type %s\n", type);
211 * pool should only be destroyed once, and should not be used
218 pr_debug("destroying pool type %s\n", zpool->driver->type);
223 zpool->driver->destroy(zpool->pool);
232 * This returns the type of the pool.
266 * This allocates the requested amount of memory from the pool.
278 return zpool->driver->malloc(zpool->pool, size, gfp, handle);
287 * that the pool will actually free memory, only that the memory
288 * in the pool will become available for use by the pool.
297 zpool->driver->free(zpool->pool, handle);
301 * zpool_shrink() - Shrink the pool size
303 * @pages: The number of pages to shrink the pool.
306 * This attempts to shrink the actual memory size of the pool
307 * by evicting currently used handle(s). If the pool was
321 zpool->driver->shrink(zpool->pool, pages, reclaimed) : -EINVAL;
349 return zpool->driver->map(zpool->pool, handle, mapmode);
364 zpool->driver->unmap(zpool->pool, handle);
368 * zpool_get_total_size() - The total size of the pool
371 * This returns the total size in bytes of the pool.
377 return zpool->driver->total_size(zpool->pool);