On Thursday 10 June 2004 5:18 pm, Kevin Corry wrote: > On Thursday 10 June 2004 9:53 pm, Dave Olien wrote: > > This patch removes the signal handling case from the sync_io() routine > > in dm-io.c. This seems appropriate for several reasons. > > Couldn't we also just convert that whole loop to a wait_event() call? The > only real difference would be that the loop currently uses io_schedule(), > whereas wait_event() would use regular schedule(). But perhaps that's a > distinction we need to maintain. > > Here's the patch anyways for review. And while we're in there hacking up that routine, we should probably add proper error handling instead of just using BUG_ON() in the event someone tries to read from multiple regions. -- Kevin Corry kevcorry@xxxxxxxxxx http://evms.sourceforge.net/ --- diff/drivers/md/dm-io.c 2004-06-10 17:28:19.113922632 +0000 +++ source/drivers/md/dm-io.c 2004-06-10 17:28:13.772734616 +0000 @@ -538,7 +538,9 @@ DECLARE_WAIT_QUEUE_HEAD(wq); struct io io; - BUG_ON(num_regions > 1 && rw != WRITE); + if (num_regions > 1 && rw != WRITE) { + return -EIO; + } io.error = 0; atomic_set(&io.count, 1); /* see dispatch_io() */