aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2008-03-28 17:16:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-28 17:45:23 -0400
commit4cdc1d1fa5c5ac14dc21be19832f02fd0b83867e (patch)
treea8c93c90dd088b18b9307bb50413478dbc48f5b5 /drivers
parentd250dad64a154a9f95ec3574e2ffc97d9f61a19c (diff)
dm io: write error bits form long not int
write_err is an unsigned long used with set_bit() so should not be passed around as unsigned int. http://bugzilla.kernel.org/show_bug.cgi?id=10271 Signed-off-by: Alasdair G Kergon <agk@redhat.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/dm-io.c2
-rw-r--r--drivers/md/dm-raid1.c4
-rw-r--r--drivers/md/dm-snap.c2
-rw-r--r--drivers/md/kcopyd.c10
-rw-r--r--drivers/md/kcopyd.h4
5 files changed, 11 insertions, 11 deletions
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c
index b8e342fe7586..8f25f628ef16 100644
--- a/drivers/md/dm-io.c
+++ b/drivers/md/dm-io.c
@@ -114,7 +114,7 @@ static void dec_count(struct io *io, unsigned int region, int error)
114 wake_up_process(io->sleeper); 114 wake_up_process(io->sleeper);
115 115
116 else { 116 else {
117 int r = io->error; 117 unsigned long r = io->error;
118 io_notify_fn fn = io->callback; 118 io_notify_fn fn = io->callback;
119 void *context = io->context; 119 void *context = io->context;
120 120
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index 51605870f898..762cb086bb7f 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -753,7 +753,7 @@ out:
753 * are in the no-sync state. We have to recover these by 753 * are in the no-sync state. We have to recover these by
754 * recopying from the default mirror to all the others. 754 * recopying from the default mirror to all the others.
755 *---------------------------------------------------------------*/ 755 *---------------------------------------------------------------*/
756static void recovery_complete(int read_err, unsigned int write_err, 756static void recovery_complete(int read_err, unsigned long write_err,
757 void *context) 757 void *context)
758{ 758{
759 struct region *reg = (struct region *)context; 759 struct region *reg = (struct region *)context;
@@ -767,7 +767,7 @@ static void recovery_complete(int read_err, unsigned int write_err,
767 } 767 }
768 768
769 if (write_err) { 769 if (write_err) {
770 DMERR_LIMIT("Write error during recovery (error = 0x%x)", 770 DMERR_LIMIT("Write error during recovery (error = 0x%lx)",
771 write_err); 771 write_err);
772 /* 772 /*
773 * Bits correspond to devices (excluding default mirror). 773 * Bits correspond to devices (excluding default mirror).
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index ae24eab8cd81..4dc8a43c034b 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -804,7 +804,7 @@ static void commit_callback(void *context, int success)
804 * Called when the copy I/O has finished. kcopyd actually runs 804 * Called when the copy I/O has finished. kcopyd actually runs
805 * this code so don't block. 805 * this code so don't block.
806 */ 806 */
807static void copy_callback(int read_err, unsigned int write_err, void *context) 807static void copy_callback(int read_err, unsigned long write_err, void *context)
808{ 808{
809 struct dm_snap_pending_exception *pe = context; 809 struct dm_snap_pending_exception *pe = context;
810 struct dm_snapshot *s = pe->snap; 810 struct dm_snapshot *s = pe->snap;
diff --git a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c
index f3831f31223e..e76b52ade690 100644
--- a/drivers/md/kcopyd.c
+++ b/drivers/md/kcopyd.c
@@ -169,7 +169,7 @@ struct kcopyd_job {
169 * Error state of the job. 169 * Error state of the job.
170 */ 170 */
171 int read_err; 171 int read_err;
172 unsigned int write_err; 172 unsigned long write_err;
173 173
174 /* 174 /*
175 * Either READ or WRITE 175 * Either READ or WRITE
@@ -293,7 +293,7 @@ static int run_complete_job(struct kcopyd_job *job)
293{ 293{
294 void *context = job->context; 294 void *context = job->context;
295 int read_err = job->read_err; 295 int read_err = job->read_err;
296 unsigned int write_err = job->write_err; 296 unsigned long write_err = job->write_err;
297 kcopyd_notify_fn fn = job->fn; 297 kcopyd_notify_fn fn = job->fn;
298 struct kcopyd_client *kc = job->kc; 298 struct kcopyd_client *kc = job->kc;
299 299
@@ -396,7 +396,7 @@ static int process_jobs(struct list_head *jobs, int (*fn) (struct kcopyd_job *))
396 if (r < 0) { 396 if (r < 0) {
397 /* error this rogue job */ 397 /* error this rogue job */
398 if (job->rw == WRITE) 398 if (job->rw == WRITE)
399 job->write_err = (unsigned int) -1; 399 job->write_err = (unsigned long) -1L;
400 else 400 else
401 job->read_err = 1; 401 job->read_err = 1;
402 push(&_complete_jobs, job); 402 push(&_complete_jobs, job);
@@ -448,8 +448,8 @@ static void dispatch_job(struct kcopyd_job *job)
448} 448}
449 449
450#define SUB_JOB_SIZE 128 450#define SUB_JOB_SIZE 128
451static void segment_complete(int read_err, 451static void segment_complete(int read_err, unsigned long write_err,
452 unsigned int write_err, void *context) 452 void *context)
453{ 453{
454 /* FIXME: tidy this function */ 454 /* FIXME: tidy this function */
455 sector_t progress = 0; 455 sector_t progress = 0;
diff --git a/drivers/md/kcopyd.h b/drivers/md/kcopyd.h
index 4621ea055c0e..4845f2a0c676 100644
--- a/drivers/md/kcopyd.h
+++ b/drivers/md/kcopyd.h
@@ -32,8 +32,8 @@ void kcopyd_client_destroy(struct kcopyd_client *kc);
32 * read_err is a boolean, 32 * read_err is a boolean,
33 * write_err is a bitset, with 1 bit for each destination region 33 * write_err is a bitset, with 1 bit for each destination region
34 */ 34 */
35typedef void (*kcopyd_notify_fn)(int read_err, 35typedef void (*kcopyd_notify_fn)(int read_err, unsigned long write_err,
36 unsigned int write_err, void *context); 36 void *context);
37 37
38int kcopyd_copy(struct kcopyd_client *kc, struct io_region *from, 38int kcopyd_copy(struct kcopyd_client *kc, struct io_region *from,
39 unsigned int num_dests, struct io_region *dests, 39 unsigned int num_dests, struct io_region *dests,