Lines Matching defs:pool

7  * This is a common frontend for memory storage pool implementations.
23 void *pool;
97 * zpool_has_pool() - Check if the pool driver is available
100 * This checks if the @type pool driver is available. This will try to load
103 * true, the caller should assume the pool is available, but must be prepared
105 * returns false, the caller should assume the requested pool type is not
106 * available; either the requested pool type module does not exist, or could
107 * not be loaded, and calling @zpool_create_pool() with the pool type will
112 * Returns: true if @type pool is available, false if not
135 * @gfp: The GFP flags to use when allocating the pool.
152 pr_debug("creating pool type %s\n", type);
174 zpool->pool = driver->create(name, gfp);
176 if (!zpool->pool) {
177 pr_err("couldn't create %s pool\n", type);
183 pr_debug("created pool type %s\n", type);
194 * pool should only be destroyed once, and should not be used
201 pr_debug("destroying pool type %s\n", zpool->driver->type);
203 zpool->driver->destroy(zpool->pool);
212 * This returns the type of the pool.
246 * This allocates the requested amount of memory from the pool.
258 return zpool->driver->malloc(zpool->pool, size, gfp, handle);
267 * that the pool will actually free memory, only that the memory
268 * in the pool will become available for use by the pool.
277 zpool->driver->free(zpool->pool, handle);
305 return zpool->driver->map(zpool->pool, handle, mapmode);
320 zpool->driver->unmap(zpool->pool, handle);
324 * zpool_get_total_size() - The total size of the pool
327 * This returns the total size in bytes of the pool.
333 return zpool->driver->total_size(zpool->pool);