Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93209
b: refs/heads/master
c: 4fdfe40
h: refs/heads/master
i:
  93207: 94dbe14
v: v3
  • Loading branch information
Adrian Bunk authored and Alasdair G Kergon committed Apr 25, 2008
1 parent c917962 commit 635a7c0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 45 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: e8488d08586e6df7fab3db7881631bb13619311b
refs/heads/master: 4fdfe401e9d7e30029972d568c667234c0c1d828
38 changes: 0 additions & 38 deletions trunk/drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,44 +245,6 @@ int dm_table_create(struct dm_table **result, int mode,
return 0;
}

int dm_create_error_table(struct dm_table **result, struct mapped_device *md)
{
struct dm_table *t;
sector_t dev_size = 1;
int r;

/*
* Find current size of device.
* Default to 1 sector if inactive.
*/
t = dm_get_table(md);
if (t) {
dev_size = dm_table_get_size(t);
dm_table_put(t);
}

r = dm_table_create(&t, FMODE_READ, 1, md);
if (r)
return r;

r = dm_table_add_target(t, "error", 0, dev_size, NULL);
if (r)
goto out;

r = dm_table_complete(t);
if (r)
goto out;

*result = t;

out:
if (r)
dm_table_put(t);

return r;
}
EXPORT_SYMBOL_GPL(dm_create_error_table);

static void free_devices(struct list_head *devices)
{
struct list_head *tmp, *next;
Expand Down
6 changes: 0 additions & 6 deletions trunk/include/linux/device-mapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,6 @@ void dm_table_event(struct dm_table *t);
*/
int dm_swap_table(struct mapped_device *md, struct dm_table *t);

/*
* Prepare a table for a device that will error all I/O.
* To make it active, call dm_suspend(), dm_swap_table() then dm_resume().
*/
int dm_create_error_table(struct dm_table **result, struct mapped_device *md);

/*-----------------------------------------------------------------
* Macros.
*---------------------------------------------------------------*/
Expand Down

0 comments on commit 635a7c0

Please sign in to comment.