aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/kcopyd.h
diff options
context:
space:
mode:
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 @@
1/* 1/*
2 * Copyright (C) 2001 Sistina Software 2 * Copyright (C) 2001 - 2003 Sistina Software
3 * Copyright (C) 2004 - 2008 Red Hat, Inc. All rights reserved.
3 * 4 *
4 * This file is released under the GPL. 5 * kcopyd provides a simple interface for copying an area of one
6 * block-device to one or more other block-devices, either synchronous
7 * or with an asynchronous completion notification.
5 * 8 *
6 * Kcopyd provides a simple interface for copying an area of one 9 * This file is released under the GPL.
7 * block-device to one or more other block-devices, with an asynchronous
8 * completion notification.
9 */ 10 */
10 11
11#ifndef DM_KCOPYD_H 12#ifndef _LINUX_DM_KCOPYD_H
12#define DM_KCOPYD_H 13#define _LINUX_DM_KCOPYD_H
14
15#ifdef __KERNEL__
13 16
14#include "dm-io.h" 17#include "dm-io.h"
15 18
16/* FIXME: make this configurable */ 19/* FIXME: make this configurable */
17#define KCOPYD_MAX_REGIONS 8 20#define DM_KCOPYD_MAX_REGIONS 8
18 21
19#define KCOPYD_IGNORE_ERROR 1 22#define DM_KCOPYD_IGNORE_ERROR 1
20 23
21/* 24/*
22 * To use kcopyd you must first create a kcopyd client object. 25 * To use kcopyd you must first create a dm_kcopyd_client object.
23 */ 26 */
24struct kcopyd_client; 27struct dm_kcopyd_client;
25int kcopyd_client_create(unsigned int num_pages, struct kcopyd_client **result); 28int dm_kcopyd_client_create(unsigned num_pages,
26void kcopyd_client_destroy(struct kcopyd_client *kc); 29 struct dm_kcopyd_client **result);
30void dm_kcopyd_client_destroy(struct dm_kcopyd_client *kc);
27 31
28/* 32/*
29 * Submit a copy job to kcopyd. This is built on top of the 33 * 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);
32 * read_err is a boolean, 36 * read_err is a boolean,
33 * write_err is a bitset, with 1 bit for each destination region 37 * write_err is a bitset, with 1 bit for each destination region
34 */ 38 */
35typedef void (*kcopyd_notify_fn)(int read_err, unsigned long write_err, 39typedef void (*dm_kcopyd_notify_fn)(int read_err, unsigned long write_err,
36 void *context); 40 void *context);
37 41
38int kcopyd_copy(struct kcopyd_client *kc, struct dm_io_region *from, 42int dm_kcopyd_copy(struct dm_kcopyd_client *kc, struct dm_io_region *from,
39 unsigned num_dests, struct dm_io_region *dests, 43 unsigned num_dests, struct dm_io_region *dests,
40 unsigned int flags, kcopyd_notify_fn fn, void *context); 44 unsigned flags, dm_kcopyd_notify_fn fn, void *context);
41 45
42#endif 46#endif /* __KERNEL__ */
47#endif /* _LINUX_DM_KCOPYD_H */