Skip to contentSkip to conversation

dm headers: Adjust dm-[io, kcopyd, log}.h by prefixing identifiers with "dm_"

RFC PATCH New Heinz Mauelshagen 1 participant 1 message Mar 5, 2008 Device mapper

lore
Share & tools
lore
#0 lore raw

RFC PATCH 2/13 dm headers: Adjust dm-[io, kcopyd, log}.h by prefixing identifiers with "dm_"

---
 include/linux/dm-io.h     |    9 +++++--
 include/linux/dm-kcopyd.h |   39 +++++++++++++++++--------------
 include/linux/dm-log.h    |   55 +++++++++++++++++++++++---------------------
 3 files changed, 56 insertions(+), 47 deletions(-)
include/linux/dm-io.h +6 -3
index f647e2c..6018e62 100644
@@ -1,5 +1,8 @@
 /*
  * Copyright (C) 2003 Sistina Software
+ * Copyright (C) 2004-2008 Red Hat GmbH
+ *
+ * Device-Mapper low-level I/O.
  *
  * This file is released under the GPL.
  */
@@ -7,9 +10,9 @@
 #ifndef _DM_IO_H
 #define _DM_IO_H
 
-#include "dm.h"
+#include <linux/types.h>
 
-struct io_region {
+struct dm_io_region {
 	struct block_device *bdev;
 	sector_t sector;
 	sector_t count;		/* If this is zero the region is ignored. */
@@ -74,6 +77,6 @@ void dm_io_client_destroy(struct dm_io_client *client);
  * error occurred doing io to the corresponding region.
  */
 int dm_io(struct dm_io_request *io_req, unsigned num_regions,
-	  struct io_region *region, unsigned long *sync_error_bits);
+	  struct dm_io_region *region, unsigned long *sync_error_bits);
 
 #endif
include/linux/dm-kcopyd.h +21 -18
index 4621ea0..ce17760 100644
@@ -1,42 +1,45 @@
 /*
- * Copyright (C) 2001 Sistina Software
+ * Copyright (C) 2001-2003 Sistina Software
+ * Copyright (C) 2004-2008 Red Hat GmbH
+ *
+ * dm-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.
  *
- * 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.
  */
 
 #ifndef DM_KCOPYD_H
 #define DM_KCOPYD_H
 
-#include "dm-io.h"
+#include <linux/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 dm-kcopyd you must first create a 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 int 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
+ * Submit a copy job to dm-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
+ * write_err is a bitset, with 1 bit for each destination region.
  */
-typedef void (*kcopyd_notify_fn)(int read_err,
-				 unsigned int write_err, void *context);
+typedef void (*dm_kcopyd_notify_fn)(int read_err,
+				    unsigned int write_err, void *context);
 
-int kcopyd_copy(struct kcopyd_client *kc, struct io_region *from,
-		unsigned int num_dests, struct 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 int num_dests, struct dm_io_region *dests,
+		   unsigned int flags, dm_kcopyd_notify_fn fn, void *context);
 
 #endif
include/linux/dm-log.h +29 -26

140 lines not on this page · raw message

Signature · 1 line
1.5.4.1