Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176565
b: refs/heads/master
c: 4f186f8
h: refs/heads/master
i:
  176563: 85f1332
v: v3
  • Loading branch information
Kiyoshi Ueda authored and Alasdair G Kergon committed Dec 10, 2009
1 parent 019742c commit 7ac42e8
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4d4471cb5c1ec426c0f24818b270dc7b3ad7e655
refs/heads/master: 4f186f8bbfa92bf1a2b39f7a8674348bfdba9437
8 changes: 4 additions & 4 deletions trunk/drivers/md/dm-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ static int __dev_status(struct mapped_device *md, struct dm_ioctl *param)
param->flags &= ~(DM_SUSPEND_FLAG | DM_READONLY_FLAG |
DM_ACTIVE_PRESENT_FLAG);

if (dm_suspended(md))
if (dm_suspended_md(md))
param->flags |= DM_SUSPEND_FLAG;

param->dev = huge_encode_dev(disk_devt(disk));
Expand Down Expand Up @@ -839,7 +839,7 @@ static int do_suspend(struct dm_ioctl *param)
if (param->flags & DM_NOFLUSH_FLAG)
suspend_flags |= DM_SUSPEND_NOFLUSH_FLAG;

if (!dm_suspended(md))
if (!dm_suspended_md(md))
r = dm_suspend(md, suspend_flags);

if (!r)
Expand Down Expand Up @@ -881,7 +881,7 @@ static int do_resume(struct dm_ioctl *param)
suspend_flags &= ~DM_SUSPEND_LOCKFS_FLAG;
if (param->flags & DM_NOFLUSH_FLAG)
suspend_flags |= DM_SUSPEND_NOFLUSH_FLAG;
if (!dm_suspended(md))
if (!dm_suspended_md(md))
dm_suspend(md, suspend_flags);

old_map = dm_swap_table(md, new_map);
Expand All @@ -897,7 +897,7 @@ static int do_resume(struct dm_ioctl *param)
set_disk_ro(dm_disk(md), 1);
}

if (dm_suspended(md))
if (dm_suspended_md(md))
r = dm_resume(md);

if (old_map)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
sprintf(buf, "%d\n", dm_suspended(md));
sprintf(buf, "%d\n", dm_suspended_md(md));

return strlen(buf);
}
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ static int dm_blk_ioctl(struct block_device *bdev, fmode_t mode,

tgt = dm_table_get_target(map, 0);

if (dm_suspended(md)) {
if (dm_suspended_md(md)) {
r = -EAGAIN;
goto out;
}
Expand Down Expand Up @@ -2182,7 +2182,7 @@ void dm_put(struct mapped_device *md)
MINOR(disk_devt(dm_disk(md))));
set_bit(DMF_FREEING, &md->flags);
spin_unlock(&_minor_lock);
if (!dm_suspended(md)) {
if (!dm_suspended_md(md)) {
dm_table_presuspend_targets(map);
dm_table_postsuspend_targets(map);
}
Expand Down Expand Up @@ -2381,7 +2381,7 @@ struct dm_table *dm_swap_table(struct mapped_device *md, struct dm_table *table)
mutex_lock(&md->suspend_lock);

/* device must be suspended */
if (!dm_suspended(md))
if (!dm_suspended_md(md))
goto out;

r = dm_calculate_queue_limits(table, &limits);
Expand Down Expand Up @@ -2461,7 +2461,7 @@ int dm_suspend(struct mapped_device *md, unsigned suspend_flags)

mutex_lock(&md->suspend_lock);

if (dm_suspended(md)) {
if (dm_suspended_md(md)) {
r = -EINVAL;
goto out_unlock;
}
Expand Down Expand Up @@ -2568,7 +2568,7 @@ int dm_resume(struct mapped_device *md)
struct dm_table *map = NULL;

mutex_lock(&md->suspend_lock);
if (!dm_suspended(md))
if (!dm_suspended_md(md))
goto out;

map = dm_get_live_table(md);
Expand Down Expand Up @@ -2679,7 +2679,7 @@ struct mapped_device *dm_get_from_kobject(struct kobject *kobj)
return md;
}

int dm_suspended(struct mapped_device *md)
int dm_suspended_md(struct mapped_device *md)
{
return test_bit(DMF_SUSPENDED, &md->flags);
}
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/md/dm.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ int dm_split_args(int *argc, char ***argvp, char *input);
*/
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;
* ioctl or filesystem, depending which patch you have applied.
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/device-mapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid);
struct gendisk *dm_disk(struct mapped_device *md);
int dm_suspended(struct mapped_device *md);
int dm_noflush_suspending(struct dm_target *ti);
union map_info *dm_get_mapinfo(struct bio *bio);
union map_info *dm_get_rq_mapinfo(struct request *rq);
Expand Down

0 comments on commit 7ac42e8

Please sign in to comment.