diff options
author | Heinz Mauelshagen <hjm@redhat.com> | 2008-04-24 16:43:17 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2008-04-25 08:26:43 -0400 |
commit | 22a1ceb1e6a7fbce95a1531ff10bb4fb036d4a37 (patch) | |
tree | 5b6ebebc747a0027626684a153b418a26119d074 /drivers/md/dm-io.c | |
parent | e01fd7eeb00f8078103f4ed3e8ef64474c11f300 (diff) |
dm io: clean interface
Clean up the dm-io 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/dm-io.c')
-rw-r--r-- | drivers/md/dm-io.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index c56c7eb86fe2..978c0414cf05 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include "dm-io.h" | 8 | #include "dm-io.h" |
9 | #include "dm.h" | ||
9 | 10 | ||
10 | #include <linux/bio.h> | 11 | #include <linux/bio.h> |
11 | #include <linux/mempool.h> | 12 | #include <linux/mempool.h> |
@@ -271,7 +272,7 @@ static void km_dp_init(struct dpages *dp, void *data) | |||
271 | /*----------------------------------------------------------------- | 272 | /*----------------------------------------------------------------- |
272 | * IO routines that accept a list of pages. | 273 | * IO routines that accept a list of pages. |
273 | *---------------------------------------------------------------*/ | 274 | *---------------------------------------------------------------*/ |
274 | static void do_region(int rw, unsigned int region, struct io_region *where, | 275 | static void do_region(int rw, unsigned region, struct dm_io_region *where, |
275 | struct dpages *dp, struct io *io) | 276 | struct dpages *dp, struct io *io) |
276 | { | 277 | { |
277 | struct bio *bio; | 278 | struct bio *bio; |
@@ -320,7 +321,7 @@ static void do_region(int rw, unsigned int region, struct io_region *where, | |||
320 | } | 321 | } |
321 | 322 | ||
322 | static void dispatch_io(int rw, unsigned int num_regions, | 323 | static void dispatch_io(int rw, unsigned int num_regions, |
323 | struct io_region *where, struct dpages *dp, | 324 | struct dm_io_region *where, struct dpages *dp, |
324 | struct io *io, int sync) | 325 | struct io *io, int sync) |
325 | { | 326 | { |
326 | int i; | 327 | int i; |
@@ -347,7 +348,7 @@ static void dispatch_io(int rw, unsigned int num_regions, | |||
347 | } | 348 | } |
348 | 349 | ||
349 | static int sync_io(struct dm_io_client *client, unsigned int num_regions, | 350 | static int sync_io(struct dm_io_client *client, unsigned int num_regions, |
350 | struct io_region *where, int rw, struct dpages *dp, | 351 | struct dm_io_region *where, int rw, struct dpages *dp, |
351 | unsigned long *error_bits) | 352 | unsigned long *error_bits) |
352 | { | 353 | { |
353 | struct io io; | 354 | struct io io; |
@@ -384,7 +385,7 @@ static int sync_io(struct dm_io_client *client, unsigned int num_regions, | |||
384 | } | 385 | } |
385 | 386 | ||
386 | static int async_io(struct dm_io_client *client, unsigned int num_regions, | 387 | static int async_io(struct dm_io_client *client, unsigned int num_regions, |
387 | struct io_region *where, int rw, struct dpages *dp, | 388 | struct dm_io_region *where, int rw, struct dpages *dp, |
388 | io_notify_fn fn, void *context) | 389 | io_notify_fn fn, void *context) |
389 | { | 390 | { |
390 | struct io *io; | 391 | struct io *io; |
@@ -438,7 +439,7 @@ static int dp_init(struct dm_io_request *io_req, struct dpages *dp) | |||
438 | * New collapsed (a)synchronous interface | 439 | * New collapsed (a)synchronous interface |
439 | */ | 440 | */ |
440 | int dm_io(struct dm_io_request *io_req, unsigned num_regions, | 441 | int dm_io(struct dm_io_request *io_req, unsigned num_regions, |
441 | struct io_region *where, unsigned long *sync_error_bits) | 442 | struct dm_io_region *where, unsigned long *sync_error_bits) |
442 | { | 443 | { |
443 | int r; | 444 | int r; |
444 | struct dpages dp; | 445 | struct dpages dp; |