From 22a1ceb1e6a7fbce95a1531ff10bb4fb036d4a37 Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Thu, 24 Apr 2008 21:43:17 +0100 Subject: dm io: clean interface Clean up the dm-io interface to prepare for publishing it in include/linux. Signed-off-by: Heinz Mauelshagen Signed-off-by: Alasdair G Kergon --- drivers/md/kcopyd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/md/kcopyd.h') diff --git a/drivers/md/kcopyd.h b/drivers/md/kcopyd.h index 4845f2a0c676..588f05dffbe1 100644 --- a/drivers/md/kcopyd.h +++ b/drivers/md/kcopyd.h @@ -35,8 +35,8 @@ void kcopyd_client_destroy(struct kcopyd_client *kc); typedef void (*kcopyd_notify_fn)(int read_err, unsigned long write_err, void *context); -int kcopyd_copy(struct kcopyd_client *kc, struct io_region *from, - unsigned int num_dests, struct io_region *dests, +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); #endif -- cgit v1.2.2 From eb69aca5d3370b81450d68edeebc2bb9a3eb9689 Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Thu, 24 Apr 2008 21:43:19 +0100 Subject: dm kcopyd: clean interface Clean up the kcopyd interface to prepare for publishing it in include/linux. Signed-off-by: Heinz Mauelshagen Signed-off-by: Alasdair G Kergon --- drivers/md/kcopyd.h | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) (limited to 'drivers/md/kcopyd.h') 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 */ -- cgit v1.2.2 From 2d1e580afe23287871529ce54429e249809525a1 Mon Sep 17 00:00:00 2001 From: Alasdair G Kergon Date: Thu, 24 Apr 2008 21:55:00 +0100 Subject: dm kcopyd: rename Rename kcopyd.[ch] to dm-kcopyd.[ch]. Signed-off-by: Alasdair G Kergon --- drivers/md/kcopyd.h | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 drivers/md/kcopyd.h (limited to 'drivers/md/kcopyd.h') diff --git a/drivers/md/kcopyd.h b/drivers/md/kcopyd.h deleted file mode 100644 index d3057846b0b0..000000000000 --- a/drivers/md/kcopyd.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2001 - 2003 Sistina Software - * Copyright (C) 2004 - 2008 Red Hat, Inc. All rights reserved. - * - * 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. - * - * This file is released under the GPL. - */ - -#ifndef _LINUX_DM_KCOPYD_H -#define _LINUX_DM_KCOPYD_H - -#ifdef __KERNEL__ - -#include "dm-io.h" - -/* FIXME: make this configurable */ -#define DM_KCOPYD_MAX_REGIONS 8 - -#define DM_KCOPYD_IGNORE_ERROR 1 - -/* - * To use kcopyd you must first create a dm_kcopyd_client object. - */ -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 - * previous three fns. - * - * read_err is a boolean, - * write_err is a bitset, with 1 bit for each destination region - */ -typedef void (*dm_kcopyd_notify_fn)(int read_err, unsigned long write_err, - 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 /* __KERNEL__ */ -#endif /* _LINUX_DM_KCOPYD_H */ -- cgit v1.2.2