dm: rename dm_suspended to dm_suspended_md
This patch renames dm_suspended() to dm_suspended_md() and keeps it internal to dm. No functional change. Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Cc: Mike Anderson <andmike@linux.vnet.ibm.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
Родитель
4d4471cb5c
Коммит
4f186f8bbf
|
@ -579,7 +579,7 @@ static int __dev_status(struct mapped_device *md, struct dm_ioctl *param)
|
||||||
param->flags &= ~(DM_SUSPEND_FLAG | DM_READONLY_FLAG |
|
param->flags &= ~(DM_SUSPEND_FLAG | DM_READONLY_FLAG |
|
||||||
DM_ACTIVE_PRESENT_FLAG);
|
DM_ACTIVE_PRESENT_FLAG);
|
||||||
|
|
||||||
if (dm_suspended(md))
|
if (dm_suspended_md(md))
|
||||||
param->flags |= DM_SUSPEND_FLAG;
|
param->flags |= DM_SUSPEND_FLAG;
|
||||||
|
|
||||||
param->dev = huge_encode_dev(disk_devt(disk));
|
param->dev = huge_encode_dev(disk_devt(disk));
|
||||||
|
@ -839,7 +839,7 @@ static int do_suspend(struct dm_ioctl *param)
|
||||||
if (param->flags & DM_NOFLUSH_FLAG)
|
if (param->flags & DM_NOFLUSH_FLAG)
|
||||||
suspend_flags |= DM_SUSPEND_NOFLUSH_FLAG;
|
suspend_flags |= DM_SUSPEND_NOFLUSH_FLAG;
|
||||||
|
|
||||||
if (!dm_suspended(md))
|
if (!dm_suspended_md(md))
|
||||||
r = dm_suspend(md, suspend_flags);
|
r = dm_suspend(md, suspend_flags);
|
||||||
|
|
||||||
if (!r)
|
if (!r)
|
||||||
|
@ -881,7 +881,7 @@ static int do_resume(struct dm_ioctl *param)
|
||||||
suspend_flags &= ~DM_SUSPEND_LOCKFS_FLAG;
|
suspend_flags &= ~DM_SUSPEND_LOCKFS_FLAG;
|
||||||
if (param->flags & DM_NOFLUSH_FLAG)
|
if (param->flags & DM_NOFLUSH_FLAG)
|
||||||
suspend_flags |= DM_SUSPEND_NOFLUSH_FLAG;
|
suspend_flags |= DM_SUSPEND_NOFLUSH_FLAG;
|
||||||
if (!dm_suspended(md))
|
if (!dm_suspended_md(md))
|
||||||
dm_suspend(md, suspend_flags);
|
dm_suspend(md, suspend_flags);
|
||||||
|
|
||||||
old_map = dm_swap_table(md, new_map);
|
old_map = dm_swap_table(md, new_map);
|
||||||
|
@ -897,7 +897,7 @@ static int do_resume(struct dm_ioctl *param)
|
||||||
set_disk_ro(dm_disk(md), 1);
|
set_disk_ro(dm_disk(md), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dm_suspended(md))
|
if (dm_suspended_md(md))
|
||||||
r = dm_resume(md);
|
r = dm_resume(md);
|
||||||
|
|
||||||
if (old_map)
|
if (old_map)
|
||||||
|
|
|
@ -59,7 +59,7 @@ static ssize_t dm_attr_uuid_show(struct mapped_device *md, char *buf)
|
||||||
|
|
||||||
static ssize_t dm_attr_suspended_show(struct mapped_device *md, char *buf)
|
static ssize_t dm_attr_suspended_show(struct mapped_device *md, char *buf)
|
||||||
{
|
{
|
||||||
sprintf(buf, "%d\n", dm_suspended(md));
|
sprintf(buf, "%d\n", dm_suspended_md(md));
|
||||||
|
|
||||||
return strlen(buf);
|
return strlen(buf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -415,7 +415,7 @@ static int dm_blk_ioctl(struct block_device *bdev, fmode_t mode,
|
||||||
|
|
||||||
tgt = dm_table_get_target(map, 0);
|
tgt = dm_table_get_target(map, 0);
|
||||||
|
|
||||||
if (dm_suspended(md)) {
|
if (dm_suspended_md(md)) {
|
||||||
r = -EAGAIN;
|
r = -EAGAIN;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -2182,7 +2182,7 @@ void dm_put(struct mapped_device *md)
|
||||||
MINOR(disk_devt(dm_disk(md))));
|
MINOR(disk_devt(dm_disk(md))));
|
||||||
set_bit(DMF_FREEING, &md->flags);
|
set_bit(DMF_FREEING, &md->flags);
|
||||||
spin_unlock(&_minor_lock);
|
spin_unlock(&_minor_lock);
|
||||||
if (!dm_suspended(md)) {
|
if (!dm_suspended_md(md)) {
|
||||||
dm_table_presuspend_targets(map);
|
dm_table_presuspend_targets(map);
|
||||||
dm_table_postsuspend_targets(map);
|
dm_table_postsuspend_targets(map);
|
||||||
}
|
}
|
||||||
|
@ -2381,7 +2381,7 @@ struct dm_table *dm_swap_table(struct mapped_device *md, struct dm_table *table)
|
||||||
mutex_lock(&md->suspend_lock);
|
mutex_lock(&md->suspend_lock);
|
||||||
|
|
||||||
/* device must be suspended */
|
/* device must be suspended */
|
||||||
if (!dm_suspended(md))
|
if (!dm_suspended_md(md))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
r = dm_calculate_queue_limits(table, &limits);
|
r = dm_calculate_queue_limits(table, &limits);
|
||||||
|
@ -2461,7 +2461,7 @@ int dm_suspend(struct mapped_device *md, unsigned suspend_flags)
|
||||||
|
|
||||||
mutex_lock(&md->suspend_lock);
|
mutex_lock(&md->suspend_lock);
|
||||||
|
|
||||||
if (dm_suspended(md)) {
|
if (dm_suspended_md(md)) {
|
||||||
r = -EINVAL;
|
r = -EINVAL;
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
}
|
}
|
||||||
|
@ -2568,7 +2568,7 @@ int dm_resume(struct mapped_device *md)
|
||||||
struct dm_table *map = NULL;
|
struct dm_table *map = NULL;
|
||||||
|
|
||||||
mutex_lock(&md->suspend_lock);
|
mutex_lock(&md->suspend_lock);
|
||||||
if (!dm_suspended(md))
|
if (!dm_suspended_md(md))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
map = dm_get_live_table(md);
|
map = dm_get_live_table(md);
|
||||||
|
@ -2679,7 +2679,7 @@ struct mapped_device *dm_get_from_kobject(struct kobject *kobj)
|
||||||
return md;
|
return md;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dm_suspended(struct mapped_device *md)
|
int dm_suspended_md(struct mapped_device *md)
|
||||||
{
|
{
|
||||||
return test_bit(DMF_SUSPENDED, &md->flags);
|
return test_bit(DMF_SUSPENDED, &md->flags);
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,6 +93,11 @@ int dm_split_args(int *argc, char ***argvp, char *input);
|
||||||
*/
|
*/
|
||||||
int dm_deleting_md(struct mapped_device *md);
|
int dm_deleting_md(struct mapped_device *md);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Is this mapped_device suspended?
|
||||||
|
*/
|
||||||
|
int dm_suspended_md(struct mapped_device *md);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The device-mapper can be driven through one of two interfaces;
|
* The device-mapper can be driven through one of two interfaces;
|
||||||
* ioctl or filesystem, depending which patch you have applied.
|
* ioctl or filesystem, depending which patch you have applied.
|
||||||
|
|
|
@ -235,7 +235,6 @@ void dm_uevent_add(struct mapped_device *md, struct list_head *elist);
|
||||||
const char *dm_device_name(struct mapped_device *md);
|
const char *dm_device_name(struct mapped_device *md);
|
||||||
int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid);
|
int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid);
|
||||||
struct gendisk *dm_disk(struct mapped_device *md);
|
struct gendisk *dm_disk(struct mapped_device *md);
|
||||||
int dm_suspended(struct mapped_device *md);
|
|
||||||
int dm_noflush_suspending(struct dm_target *ti);
|
int dm_noflush_suspending(struct dm_target *ti);
|
||||||
union map_info *dm_get_mapinfo(struct bio *bio);
|
union map_info *dm_get_mapinfo(struct bio *bio);
|
||||||
union map_info *dm_get_rq_mapinfo(struct request *rq);
|
union map_info *dm_get_rq_mapinfo(struct request *rq);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче