17/19

Joe Thornber (joe@fib011235813.fsnet.co.uk)
Mon, 16 Dec 2002 10:17:48 +0000


o If there's an error you still need to call bio_endio with bio->bi_size
as the 'done' param.

o Simplify clone_endio.

[Kevin Corry]
--- diff/drivers/md/dm.c 2002-12-16 09:41:34.000000000 +0000
+++ source/drivers/md/dm.c 2002-12-16 09:41:39.000000000 +0000
@@ -249,7 +249,7 @@
/* nudge anyone waiting on suspend queue */
wake_up(&io->md->wait);

- bio_endio(io->bio, io->error ? 0 : io->bio->bi_size, io->error);
+ bio_endio(io->bio, io->bio->bi_size, io->error);
free_io(io->md, io);
}
}
@@ -258,16 +258,11 @@
{
struct dm_io *io = bio->bi_private;

- /*
- * Only call dec_pending if the clone has completely
- * finished. If a partial io errors I'm assuming it won't
- * be requeued. FIXME: check this.
- */
- if (error || !bio->bi_size) {
- dec_pending(io, error);
- bio_put(bio);
- }
+ if (bio->bi_size)
+ return 1;

+ dec_pending(io, error);
+ bio_put(bio);
return 0;
}

@@ -454,13 +449,13 @@
up_read(&md->lock);

if (bio_rw(bio) == READA) {
- bio_io_error(bio, 0);
+ bio_io_error(bio, bio->bi_size);
return 0;
}

r = queue_io(md, bio);
if (r < 0) {
- bio_io_error(bio, 0);
+ bio_io_error(bio, bio->bi_size);
return 0;

} else if (r == 0)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/