mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
o dm-target compiles
This commit is contained in:
parent
8b0affe220
commit
fbc4a8894f
@ -49,7 +49,7 @@ struct target *dm_get_target(const char *name)
|
||||
int register_map_target(const char *name, dm_ctr_fn ctr,
|
||||
dm_dtr_fn dtr, dm_map_fn map)
|
||||
{
|
||||
struct target *t = kmalloc(sizeof(*m) + strlen(name) + 1, GFP_KERNEL);
|
||||
struct target *t = kmalloc(sizeof(*t) + strlen(name) + 1, GFP_KERNEL);
|
||||
|
||||
if (!t)
|
||||
return -ENOMEM;
|
||||
@ -168,7 +168,7 @@ int dm_std_targets(void)
|
||||
int ret;
|
||||
|
||||
#define xx(n, fn) \
|
||||
if ((ret = register_mapping_type(n, \
|
||||
if ((ret = register_map_target(n, \
|
||||
fn ## _ctr, fn ## _dtr, fn ## _map) < 0)) return ret
|
||||
|
||||
xx("io-err", _io_err);
|
||||
|
@ -116,8 +116,6 @@
|
||||
#define MAX_DEVICES 64
|
||||
#define DEFAULT_READ_AHEAD 64
|
||||
|
||||
#define WARN(f, x...) printk(KERN_WARNING "%s " f "\n", _name , ## x)
|
||||
|
||||
const char *_name = "device-mapper";
|
||||
int _version[3] = {1, 0, 0};
|
||||
|
||||
@ -478,7 +476,7 @@ int dm_remove(const char *name, int minor)
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
dm_clear_table(md);
|
||||
dm_free_table(md);
|
||||
for (d = md->devices; d; d = n) {
|
||||
n = d->next;
|
||||
kfree(d);
|
||||
|
@ -118,6 +118,9 @@ void dm_free_table(struct mapped_device *md);
|
||||
int dm_init_fs(void);
|
||||
int dm_fin_fs(void);
|
||||
|
||||
|
||||
#define WARN(f, x...) printk(KERN_WARNING "device-mapper: " f "\n" , ## x)
|
||||
|
||||
static inline int is_active(struct mapped_device *md)
|
||||
{
|
||||
return test_bit(DM_ACTIVE, &md->state);
|
||||
|
Loading…
Reference in New Issue
Block a user