Loading drivers/md/dm-exception-store.c +2 −2 Original line number Diff line number Diff line Loading @@ -159,7 +159,7 @@ static void free_area(struct pstore *ps) } struct mdata_req { struct io_region *where; struct dm_io_region *where; struct dm_io_request *io_req; struct work_struct work; int result; Loading @@ -177,7 +177,7 @@ static void do_metadata(struct work_struct *work) */ static int chunk_io(struct pstore *ps, uint32_t chunk, int rw, int metadata) { struct io_region where = { struct dm_io_region where = { .bdev = ps->snap->cow->bdev, .sector = ps->snap->chunk_size * chunk, .count = ps->snap->chunk_size, Loading drivers/md/dm-io.c +6 −5 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ */ #include "dm-io.h" #include "dm.h" #include <linux/bio.h> #include <linux/mempool.h> Loading Loading @@ -271,7 +272,7 @@ static void km_dp_init(struct dpages *dp, void *data) /*----------------------------------------------------------------- * IO routines that accept a list of pages. *---------------------------------------------------------------*/ static void do_region(int rw, unsigned int region, struct io_region *where, static void do_region(int rw, unsigned region, struct dm_io_region *where, struct dpages *dp, struct io *io) { struct bio *bio; Loading Loading @@ -320,7 +321,7 @@ static void do_region(int rw, unsigned int region, struct io_region *where, } static void dispatch_io(int rw, unsigned int num_regions, struct io_region *where, struct dpages *dp, struct dm_io_region *where, struct dpages *dp, struct io *io, int sync) { int i; Loading @@ -347,7 +348,7 @@ static void dispatch_io(int rw, unsigned int num_regions, } static int sync_io(struct dm_io_client *client, unsigned int num_regions, struct io_region *where, int rw, struct dpages *dp, struct dm_io_region *where, int rw, struct dpages *dp, unsigned long *error_bits) { struct io io; Loading Loading @@ -384,7 +385,7 @@ static int sync_io(struct dm_io_client *client, unsigned int num_regions, } static int async_io(struct dm_io_client *client, unsigned int num_regions, struct io_region *where, int rw, struct dpages *dp, struct dm_io_region *where, int rw, struct dpages *dp, io_notify_fn fn, void *context) { struct io *io; Loading Loading @@ -438,7 +439,7 @@ static int dp_init(struct dm_io_request *io_req, struct dpages *dp) * New collapsed (a)synchronous interface */ int dm_io(struct dm_io_request *io_req, unsigned num_regions, struct io_region *where, unsigned long *sync_error_bits) struct dm_io_region *where, unsigned long *sync_error_bits) { int r; struct dpages dp; Loading drivers/md/dm-io.h +12 −6 Original line number Diff line number Diff line /* * 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 dm_io_region { struct block_device *bdev; sector_t sector; sector_t count; /* If this is zero the region is ignored. */ Loading Loading @@ -74,6 +79,7 @@ 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 #endif /* __KERNEL__ */ #endif /* _LINUX_DM_IO_H */ drivers/md/dm-log.c +1 −1 Original line number Diff line number Diff line Loading @@ -208,7 +208,7 @@ struct log_c { struct dm_dev *log_dev; struct log_header header; struct io_region header_location; struct dm_io_region header_location; struct log_header *disk_header; }; Loading drivers/md/dm-raid1.c +4 −4 Original line number Diff line number Diff line Loading @@ -788,7 +788,7 @@ static int recover(struct mirror_set *ms, struct region *reg) { int r; unsigned int i; struct io_region from, to[KCOPYD_MAX_REGIONS], *dest; struct dm_io_region from, to[KCOPYD_MAX_REGIONS], *dest; struct mirror *m; unsigned long flags = 0; Loading Loading @@ -907,7 +907,7 @@ static void map_bio(struct mirror *m, struct bio *bio) bio->bi_sector = map_sector(m, bio); } static void map_region(struct io_region *io, struct mirror *m, static void map_region(struct dm_io_region *io, struct mirror *m, struct bio *bio) { io->bdev = m->dev->bdev; Loading Loading @@ -949,7 +949,7 @@ static void read_callback(unsigned long error, void *context) /* Asynchronous read. */ static void read_async_bio(struct mirror *m, struct bio *bio) { struct io_region io; struct dm_io_region io; struct dm_io_request io_req = { .bi_rw = READ, .mem.type = DM_IO_BVEC, Loading Loading @@ -1105,7 +1105,7 @@ static void write_callback(unsigned long error, void *context) static void do_write(struct mirror_set *ms, struct bio *bio) { unsigned int i; struct io_region io[ms->nr_mirrors], *dest = io; struct dm_io_region io[ms->nr_mirrors], *dest = io; struct mirror *m; struct dm_io_request io_req = { .bi_rw = WRITE, Loading Loading
drivers/md/dm-exception-store.c +2 −2 Original line number Diff line number Diff line Loading @@ -159,7 +159,7 @@ static void free_area(struct pstore *ps) } struct mdata_req { struct io_region *where; struct dm_io_region *where; struct dm_io_request *io_req; struct work_struct work; int result; Loading @@ -177,7 +177,7 @@ static void do_metadata(struct work_struct *work) */ static int chunk_io(struct pstore *ps, uint32_t chunk, int rw, int metadata) { struct io_region where = { struct dm_io_region where = { .bdev = ps->snap->cow->bdev, .sector = ps->snap->chunk_size * chunk, .count = ps->snap->chunk_size, Loading
drivers/md/dm-io.c +6 −5 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ */ #include "dm-io.h" #include "dm.h" #include <linux/bio.h> #include <linux/mempool.h> Loading Loading @@ -271,7 +272,7 @@ static void km_dp_init(struct dpages *dp, void *data) /*----------------------------------------------------------------- * IO routines that accept a list of pages. *---------------------------------------------------------------*/ static void do_region(int rw, unsigned int region, struct io_region *where, static void do_region(int rw, unsigned region, struct dm_io_region *where, struct dpages *dp, struct io *io) { struct bio *bio; Loading Loading @@ -320,7 +321,7 @@ static void do_region(int rw, unsigned int region, struct io_region *where, } static void dispatch_io(int rw, unsigned int num_regions, struct io_region *where, struct dpages *dp, struct dm_io_region *where, struct dpages *dp, struct io *io, int sync) { int i; Loading @@ -347,7 +348,7 @@ static void dispatch_io(int rw, unsigned int num_regions, } static int sync_io(struct dm_io_client *client, unsigned int num_regions, struct io_region *where, int rw, struct dpages *dp, struct dm_io_region *where, int rw, struct dpages *dp, unsigned long *error_bits) { struct io io; Loading Loading @@ -384,7 +385,7 @@ static int sync_io(struct dm_io_client *client, unsigned int num_regions, } static int async_io(struct dm_io_client *client, unsigned int num_regions, struct io_region *where, int rw, struct dpages *dp, struct dm_io_region *where, int rw, struct dpages *dp, io_notify_fn fn, void *context) { struct io *io; Loading Loading @@ -438,7 +439,7 @@ static int dp_init(struct dm_io_request *io_req, struct dpages *dp) * New collapsed (a)synchronous interface */ int dm_io(struct dm_io_request *io_req, unsigned num_regions, struct io_region *where, unsigned long *sync_error_bits) struct dm_io_region *where, unsigned long *sync_error_bits) { int r; struct dpages dp; Loading
drivers/md/dm-io.h +12 −6 Original line number Diff line number Diff line /* * 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 dm_io_region { struct block_device *bdev; sector_t sector; sector_t count; /* If this is zero the region is ignored. */ Loading Loading @@ -74,6 +79,7 @@ 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 #endif /* __KERNEL__ */ #endif /* _LINUX_DM_IO_H */
drivers/md/dm-log.c +1 −1 Original line number Diff line number Diff line Loading @@ -208,7 +208,7 @@ struct log_c { struct dm_dev *log_dev; struct log_header header; struct io_region header_location; struct dm_io_region header_location; struct log_header *disk_header; }; Loading
drivers/md/dm-raid1.c +4 −4 Original line number Diff line number Diff line Loading @@ -788,7 +788,7 @@ static int recover(struct mirror_set *ms, struct region *reg) { int r; unsigned int i; struct io_region from, to[KCOPYD_MAX_REGIONS], *dest; struct dm_io_region from, to[KCOPYD_MAX_REGIONS], *dest; struct mirror *m; unsigned long flags = 0; Loading Loading @@ -907,7 +907,7 @@ static void map_bio(struct mirror *m, struct bio *bio) bio->bi_sector = map_sector(m, bio); } static void map_region(struct io_region *io, struct mirror *m, static void map_region(struct dm_io_region *io, struct mirror *m, struct bio *bio) { io->bdev = m->dev->bdev; Loading Loading @@ -949,7 +949,7 @@ static void read_callback(unsigned long error, void *context) /* Asynchronous read. */ static void read_async_bio(struct mirror *m, struct bio *bio) { struct io_region io; struct dm_io_region io; struct dm_io_request io_req = { .bi_rw = READ, .mem.type = DM_IO_BVEC, Loading Loading @@ -1105,7 +1105,7 @@ static void write_callback(unsigned long error, void *context) static void do_write(struct mirror_set *ms, struct bio *bio) { unsigned int i; struct io_region io[ms->nr_mirrors], *dest = io; struct dm_io_region io[ms->nr_mirrors], *dest = io; struct mirror *m; struct dm_io_request io_req = { .bi_rw = WRITE, Loading