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>

authored by Alasdair G Kergon and committed by Linus Torvalds 4cdc1d1f d250dad6

+11 -11
+1 -1
drivers/md/dm-io.c
··· 114 114 wake_up_process(io->sleeper); 115 115 116 116 else { 117 - int r = io->error; 117 + unsigned long r = io->error; 118 118 io_notify_fn fn = io->callback; 119 119 void *context = io->context; 120 120
+2 -2
drivers/md/dm-raid1.c
··· 753 753 * are in the no-sync state. We have to recover these by 754 754 * recopying from the default mirror to all the others. 755 755 *---------------------------------------------------------------*/ 756 - static void recovery_complete(int read_err, unsigned int write_err, 756 + static void recovery_complete(int read_err, unsigned long write_err, 757 757 void *context) 758 758 { 759 759 struct region *reg = (struct region *)context; ··· 767 767 } 768 768 769 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 771 write_err); 772 772 /* 773 773 * Bits correspond to devices (excluding default mirror).
+1 -1
drivers/md/dm-snap.c
··· 804 804 * Called when the copy I/O has finished. kcopyd actually runs 805 805 * this code so don't block. 806 806 */ 807 - static void copy_callback(int read_err, unsigned int write_err, void *context) 807 + static void copy_callback(int read_err, unsigned long write_err, void *context) 808 808 { 809 809 struct dm_snap_pending_exception *pe = context; 810 810 struct dm_snapshot *s = pe->snap;
+5 -5
drivers/md/kcopyd.c
··· 169 169 * Error state of the job. 170 170 */ 171 171 int read_err; 172 - unsigned int write_err; 172 + unsigned long write_err; 173 173 174 174 /* 175 175 * Either READ or WRITE ··· 293 293 { 294 294 void *context = job->context; 295 295 int read_err = job->read_err; 296 - unsigned int write_err = job->write_err; 296 + unsigned long write_err = job->write_err; 297 297 kcopyd_notify_fn fn = job->fn; 298 298 struct kcopyd_client *kc = job->kc; 299 299 ··· 396 396 if (r < 0) { 397 397 /* error this rogue job */ 398 398 if (job->rw == WRITE) 399 - job->write_err = (unsigned int) -1; 399 + job->write_err = (unsigned long) -1L; 400 400 else 401 401 job->read_err = 1; 402 402 push(&_complete_jobs, job); ··· 448 448 } 449 449 450 450 #define SUB_JOB_SIZE 128 451 - static void segment_complete(int read_err, 452 - unsigned int write_err, void *context) 451 + static void segment_complete(int read_err, unsigned long write_err, 452 + void *context) 453 453 { 454 454 /* FIXME: tidy this function */ 455 455 sector_t progress = 0;
+2 -2
drivers/md/kcopyd.h
··· 32 32 * read_err is a boolean, 33 33 * write_err is a bitset, with 1 bit for each destination region 34 34 */ 35 - typedef void (*kcopyd_notify_fn)(int read_err, 36 - unsigned int write_err, void *context); 35 + typedef void (*kcopyd_notify_fn)(int read_err, unsigned long write_err, 36 + void *context); 37 37 38 38 int kcopyd_copy(struct kcopyd_client *kc, struct io_region *from, 39 39 unsigned int num_dests, struct io_region *dests,