aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-snap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-snap.c')
-rw-r--r--drivers/md/dm-snap.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index 08312b46463a..1d0fafda0f76 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -7,7 +7,6 @@
7 */ 7 */
8 8
9#include <linux/blkdev.h> 9#include <linux/blkdev.h>
10#include <linux/config.h>
11#include <linux/ctype.h> 10#include <linux/ctype.h>
12#include <linux/device-mapper.h> 11#include <linux/device-mapper.h>
13#include <linux/fs.h> 12#include <linux/fs.h>
@@ -23,6 +22,8 @@
23#include "dm-bio-list.h" 22#include "dm-bio-list.h"
24#include "kcopyd.h" 23#include "kcopyd.h"
25 24
25#define DM_MSG_PREFIX "snapshots"
26
26/* 27/*
27 * The percentage increment we will wake up users at 28 * The percentage increment we will wake up users at
28 */ 29 */
@@ -117,7 +118,7 @@ static int init_origin_hash(void)
117 _origins = kmalloc(ORIGIN_HASH_SIZE * sizeof(struct list_head), 118 _origins = kmalloc(ORIGIN_HASH_SIZE * sizeof(struct list_head),
118 GFP_KERNEL); 119 GFP_KERNEL);
119 if (!_origins) { 120 if (!_origins) {
120 DMERR("Device mapper: Snapshot: unable to allocate memory"); 121 DMERR("unable to allocate memory");
121 return -ENOMEM; 122 return -ENOMEM;
122 } 123 }
123 124
@@ -412,7 +413,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
412 int blocksize; 413 int blocksize;
413 414
414 if (argc < 4) { 415 if (argc < 4) {
415 ti->error = "dm-snapshot: requires exactly 4 arguments"; 416 ti->error = "requires exactly 4 arguments";
416 r = -EINVAL; 417 r = -EINVAL;
417 goto bad1; 418 goto bad1;
418 } 419 }
@@ -530,7 +531,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
530 } 531 }
531 532
532 ti->private = s; 533 ti->private = s;
533 ti->split_io = chunk_size; 534 ti->split_io = s->chunk_size;
534 535
535 return 0; 536 return 0;
536 537
@@ -1127,7 +1128,7 @@ static int origin_ctr(struct dm_target *ti, unsigned int argc, char **argv)
1127 struct dm_dev *dev; 1128 struct dm_dev *dev;
1128 1129
1129 if (argc != 1) { 1130 if (argc != 1) {
1130 ti->error = "dm-origin: incorrect number of arguments"; 1131 ti->error = "origin: incorrect number of arguments";
1131 return -EINVAL; 1132 return -EINVAL;
1132 } 1133 }
1133 1134
@@ -1204,7 +1205,7 @@ static int origin_status(struct dm_target *ti, status_type_t type, char *result,
1204 1205
1205static struct target_type origin_target = { 1206static struct target_type origin_target = {
1206 .name = "snapshot-origin", 1207 .name = "snapshot-origin",
1207 .version = {1, 1, 0}, 1208 .version = {1, 4, 0},
1208 .module = THIS_MODULE, 1209 .module = THIS_MODULE,
1209 .ctr = origin_ctr, 1210 .ctr = origin_ctr,
1210 .dtr = origin_dtr, 1211 .dtr = origin_dtr,
@@ -1215,7 +1216,7 @@ static struct target_type origin_target = {
1215 1216
1216static struct target_type snapshot_target = { 1217static struct target_type snapshot_target = {
1217 .name = "snapshot", 1218 .name = "snapshot",
1218 .version = {1, 1, 0}, 1219 .version = {1, 4, 0},
1219 .module = THIS_MODULE, 1220 .module = THIS_MODULE,
1220 .ctr = snapshot_ctr, 1221 .ctr = snapshot_ctr,
1221 .dtr = snapshot_dtr, 1222 .dtr = snapshot_dtr,
@@ -1236,7 +1237,7 @@ static int __init dm_snapshot_init(void)
1236 1237
1237 r = dm_register_target(&origin_target); 1238 r = dm_register_target(&origin_target);
1238 if (r < 0) { 1239 if (r < 0) {
1239 DMERR("Device mapper: Origin: register failed %d\n", r); 1240 DMERR("Origin target register failed %d", r);
1240 goto bad1; 1241 goto bad1;
1241 } 1242 }
1242 1243