|
@@ -129,6 +129,7 @@ static void zpool_put_driver(struct zpool_driver *driver)
|
|
/**
|
|
/**
|
|
* zpool_create_pool() - Create a new zpool
|
|
* zpool_create_pool() - Create a new zpool
|
|
* @type The type of the zpool to create (e.g. zbud, zsmalloc)
|
|
* @type The type of the zpool to create (e.g. zbud, zsmalloc)
|
|
|
|
+ * @name The name of the zpool (e.g. zram0, zswap)
|
|
* @gfp The GFP flags to use when allocating the pool.
|
|
* @gfp The GFP flags to use when allocating the pool.
|
|
* @ops The optional ops callback.
|
|
* @ops The optional ops callback.
|
|
*
|
|
*
|
|
@@ -140,7 +141,8 @@ static void zpool_put_driver(struct zpool_driver *driver)
|
|
*
|
|
*
|
|
* Returns: New zpool on success, NULL on failure.
|
|
* Returns: New zpool on success, NULL on failure.
|
|
*/
|
|
*/
|
|
-struct zpool *zpool_create_pool(char *type, gfp_t gfp, struct zpool_ops *ops)
|
|
|
|
|
|
+struct zpool *zpool_create_pool(char *type, char *name, gfp_t gfp,
|
|
|
|
+ struct zpool_ops *ops)
|
|
{
|
|
{
|
|
struct zpool_driver *driver;
|
|
struct zpool_driver *driver;
|
|
struct zpool *zpool;
|
|
struct zpool *zpool;
|
|
@@ -168,7 +170,7 @@ struct zpool *zpool_create_pool(char *type, gfp_t gfp, struct zpool_ops *ops)
|
|
|
|
|
|
zpool->type = driver->type;
|
|
zpool->type = driver->type;
|
|
zpool->driver = driver;
|
|
zpool->driver = driver;
|
|
- zpool->pool = driver->create(gfp, ops);
|
|
|
|
|
|
+ zpool->pool = driver->create(name, gfp, ops);
|
|
zpool->ops = ops;
|
|
zpool->ops = ops;
|
|
|
|
|
|
if (!zpool->pool) {
|
|
if (!zpool->pool) {
|