Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38101
b: refs/heads/master
c: 8757b77
h: refs/heads/master
i:
  38099: 198180f
v: v3
  • Loading branch information
Milan Broz authored and Linus Torvalds committed Oct 3, 2006
1 parent 1d2b0b0 commit c501475
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 7 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: cc1092019ce3d9b3e85a285b41e852ff94a6b590
refs/heads/master: 8757b7764f13e336f3c0eb1f634440d4ee4c3a67
17 changes: 15 additions & 2 deletions trunk/drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,16 +939,29 @@ void dm_table_postsuspend_targets(struct dm_table *t)
return suspend_targets(t, 1);
}

void dm_table_resume_targets(struct dm_table *t)
int dm_table_resume_targets(struct dm_table *t)
{
int i;
int i, r = 0;

for (i = 0; i < t->num_targets; i++) {
struct dm_target *ti = t->targets + i;

if (!ti->type->preresume)
continue;

r = ti->type->preresume(ti);
if (r)
return r;
}

for (i = 0; i < t->num_targets; i++) {
struct dm_target *ti = t->targets + i;

if (ti->type->resume)
ti->type->resume(ti);
}

return 0;
}

int dm_table_any_congested(struct dm_table *t, int bdi_bits)
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,9 @@ int dm_resume(struct mapped_device *md)
if (!map || !dm_table_get_size(map))
goto out;

dm_table_resume_targets(map);
r = dm_table_resume_targets(map);
if (r)
goto out;

down_write(&md->io_lock);
clear_bit(DMF_BLOCK_IO, &md->flags);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q);
struct list_head *dm_table_get_devices(struct dm_table *t);
void dm_table_presuspend_targets(struct dm_table *t);
void dm_table_postsuspend_targets(struct dm_table *t);
void dm_table_resume_targets(struct dm_table *t);
int dm_table_resume_targets(struct dm_table *t);
int dm_table_any_congested(struct dm_table *t, int bdi_bits);
void dm_table_unplug_all(struct dm_table *t);
int dm_table_flush_all(struct dm_table *t);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/device-mapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ typedef int (*dm_endio_fn) (struct dm_target *ti,

typedef void (*dm_presuspend_fn) (struct dm_target *ti);
typedef void (*dm_postsuspend_fn) (struct dm_target *ti);
typedef int (*dm_preresume_fn) (struct dm_target *ti);
typedef void (*dm_resume_fn) (struct dm_target *ti);

typedef int (*dm_status_fn) (struct dm_target *ti, status_type_t status_type,
Expand Down Expand Up @@ -92,6 +93,7 @@ struct target_type {
dm_endio_fn end_io;
dm_presuspend_fn presuspend;
dm_postsuspend_fn postsuspend;
dm_preresume_fn preresume;
dm_resume_fn resume;
dm_status_fn status;
dm_message_fn message;
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/dm-ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,9 @@ typedef char ioctl_struct[308];
#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)

#define DM_VERSION_MAJOR 4
#define DM_VERSION_MINOR 8
#define DM_VERSION_MINOR 9
#define DM_VERSION_PATCHLEVEL 0
#define DM_VERSION_EXTRA "-ioctl (2006-06-24)"
#define DM_VERSION_EXTRA "-ioctl (2006-09-14)"

/* Status bits */
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
Expand Down

0 comments on commit c501475

Please sign in to comment.