summaryrefslogtreecommitdiffstats
path: root/drivers/md/kcopyd.h
diff options
context:
space:
mode:
authorHeinz Mauelshagen <hjm@redhat.com>2008-04-24 21:43:19 +0100
committerAlasdair G Kergon <agk@redhat.com>2008-04-25 13:26:44 +0100
commiteb69aca5d3370b81450d68edeebc2bb9a3eb9689 (patch)
treeddb4c6d52e963b0898a892aaaee3228680e36449 /drivers/md/kcopyd.h
parent22a1ceb1e6a7fbce95a1531ff10bb4fb036d4a37 (diff)
downloadblackbird-op-linux-eb69aca5d3370b81450d68edeebc2bb9a3eb9689.tar.gz
blackbird-op-linux-eb69aca5d3370b81450d68edeebc2bb9a3eb9689.zip
dm kcopyd: clean interface
Clean up the kcopyd interface to prepare for publishing it in include/linux. Signed-off-by: Heinz Mauelshagen <hjm@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/kcopyd.h')
-rw-r--r--drivers/md/kcopyd.h43
1 files changed, 24 insertions, 19 deletions
diff --git a/drivers/md/kcopyd.h b/drivers/md/kcopyd.h
index 588f05dffbe1..d3057846b0b0 100644
--- a/drivers/md/kcopyd.h
+++ b/drivers/md/kcopyd.h
@@ -1,29 +1,33 @@
/*
- * Copyright (C) 2001 Sistina Software
+ * Copyright (C) 2001 - 2003 Sistina Software
+ * Copyright (C) 2004 - 2008 Red Hat, Inc. All rights reserved.
*
- * This file is released under the GPL.
+ * kcopyd provides a simple interface for copying an area of one
+ * block-device to one or more other block-devices, either synchronous
+ * or with an asynchronous completion notification.
*
- * Kcopyd provides a simple interface for copying an area of one
- * block-device to one or more other block-devices, with an asynchronous
- * completion notification.
+ * This file is released under the GPL.
*/
-#ifndef DM_KCOPYD_H
-#define DM_KCOPYD_H
+#ifndef _LINUX_DM_KCOPYD_H
+#define _LINUX_DM_KCOPYD_H
+
+#ifdef __KERNEL__
#include "dm-io.h"
/* FIXME: make this configurable */
-#define KCOPYD_MAX_REGIONS 8
+#define DM_KCOPYD_MAX_REGIONS 8
-#define KCOPYD_IGNORE_ERROR 1
+#define DM_KCOPYD_IGNORE_ERROR 1
/*
- * To use kcopyd you must first create a kcopyd client object.
+ * To use kcopyd you must first create a dm_kcopyd_client object.
*/
-struct kcopyd_client;
-int kcopyd_client_create(unsigned int num_pages, struct kcopyd_client **result);
-void kcopyd_client_destroy(struct kcopyd_client *kc);
+struct dm_kcopyd_client;
+int dm_kcopyd_client_create(unsigned num_pages,
+ struct dm_kcopyd_client **result);
+void dm_kcopyd_client_destroy(struct dm_kcopyd_client *kc);
/*
* Submit a copy job to kcopyd. This is built on top of the
@@ -32,11 +36,12 @@ void kcopyd_client_destroy(struct kcopyd_client *kc);
* read_err is a boolean,
* write_err is a bitset, with 1 bit for each destination region
*/
-typedef void (*kcopyd_notify_fn)(int read_err, unsigned long write_err,
- void *context);
+typedef void (*dm_kcopyd_notify_fn)(int read_err, unsigned long write_err,
+ void *context);
-int kcopyd_copy(struct kcopyd_client *kc, struct dm_io_region *from,
- unsigned num_dests, struct dm_io_region *dests,
- unsigned int flags, kcopyd_notify_fn fn, void *context);
+int dm_kcopyd_copy(struct dm_kcopyd_client *kc, struct dm_io_region *from,
+ unsigned num_dests, struct dm_io_region *dests,
+ unsigned flags, dm_kcopyd_notify_fn fn, void *context);
-#endif
+#endif /* __KERNEL__ */
+#endif /* _LINUX_DM_KCOPYD_H */
OpenPOWER on IntegriCloud