From: Jonathan Brassow <jbrassow@redhat.com> Date: Tue, 12 Aug 2008 13:46:10 -0500 Subject: [md] clean up the dm-io interface Message-id: 1218566771.22247.27.camel@hydrogen O-Subject: [RHEL 5.3 Patch 3 of 8]: device-mapper interface exposure (bz 429337) Bugzilla: 429337 RH-Acked-by: Alasdair G Kergon <agk@redhat.com> Patch: dm-io-clean-interface.patch brassow Clean up the dm-io interface to prepare for publishing it in include/linux. Originator: Heinz Mauelshagen <hjm@redhat.com> Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index 6420a73..1ae4818 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c @@ -4,6 +4,7 @@ * This file is released under the GPL. */ +#include "dm.h" #include "dm-io.h" #include <linux/bio.h> diff --git a/drivers/md/dm-io.h b/drivers/md/dm-io.h index 2f5084e..94fc992 100644 --- a/drivers/md/dm-io.h +++ b/drivers/md/dm-io.h @@ -1,13 +1,18 @@ /* * Copyright (C) 2003 Sistina Software + * Copyright (C) 2004 - 2008 Red Hat, Inc. All rights reserved. + * + * Device-Mapper low-level I/O. * * This file is released under the GPL. */ -#ifndef _DM_IO_H -#define _DM_IO_H +#ifndef _LINUX_DM_IO_H +#define _LINUX_DM_IO_H + +#ifdef __KERNEL__ -#include "dm.h" +#include <linux/types.h> struct io_region { struct block_device *bdev; @@ -124,4 +129,5 @@ int dm_io_async_vm(unsigned int num_regions, struct io_region *where, int rw, int dm_io(struct dm_io_request *io_req, unsigned num_regions, struct io_region *region, unsigned long *sync_error_bits); -#endif +#endif /* __KERNEL__ */ +#endif /* _LINUX_DM_IO_H */ diff --git a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c index b079d04..edcc9b1 100644 --- a/drivers/md/kcopyd.c +++ b/drivers/md/kcopyd.c @@ -23,6 +23,7 @@ #include <linux/workqueue.h> #include <linux/mutex.h> +#include "dm.h" #include "kcopyd.h" /*-----------------------------------------------------------------