Lines Matching refs:type

25 	struct dm_exception_store_type *type;
27 list_for_each_entry(type, &_exception_store_types, list)
28 if (!strcmp(name, type->name))
29 return type;
36 struct dm_exception_store_type *type;
40 type = __find_exception_store_type(name);
42 if (type && !try_module_get(type->module))
43 type = NULL;
47 return type;
76 struct dm_exception_store_type *type;
78 type = _get_exception_store_type(type_name);
79 if (type)
80 return type;
89 !(type = _get_exception_store_type(type_name))) {
96 if (!type)
97 DMWARN("Module for exstore type \"%s\" not found.", type_name);
101 return type;
104 static void put_type(struct dm_exception_store_type *type)
107 module_put(type->module);
111 int dm_exception_store_type_register(struct dm_exception_store_type *type)
116 if (!__find_exception_store_type(type->name))
117 list_add(&type->list, &_exception_store_types);
126 int dm_exception_store_type_unregister(struct dm_exception_store_type *type)
130 if (!__find_exception_store_type(type->name)) {
135 list_del(&type->list);
198 struct dm_exception_store_type *type = NULL;
215 type = get_type("P");
217 type = get_type("N");
219 ti->error = "Exception store type is not P or N";
224 if (!type) {
225 ti->error = "Exception store type not recognised";
230 tmp_store->type = type;
237 r = type->ctr(tmp_store, (strlen(argv[0]) > 1 ? &argv[0][1] : NULL));
239 ti->error = "Exception store type constructor failed";
248 put_type(type);
257 store->type->dtr(store);
258 put_type(store->type);
269 DMERR("Unable to register transient exception store type.");
275 DMERR("Unable to register persistent exception store type");