lkml.org 
[lkml]   [2004]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch 1/6] dm: endio method
Joe Thornber wrote:

> Add an endio method to targets. This method is allowed to request
> another shot at failed ios (think multipath).


> + if (endio) {
> + /* Restore bio fields. */
> + bio->bi_sector = tio->bi_sector;
> + bio->bi_bdev = tio->bi_bdev;
> + bio->bi_size = tio->bi_size;
> + bio->bi_idx = tio->bi_idx;
> +
> + r = endio(tio->ti, bio, error, &tio->info);


> + r = ti->type->map(ti, clone, &tio->info);
> + if (r > 0) {
> + /* Save the bio info so we can restore it during endio. */
> + tio->bi_sector = clone->bi_sector;
> + tio->bi_bdev = clone->bi_bdev;
> + tio->bi_size = clone->bi_size;
> + tio->bi_idx = clone->bi_idx;


Saving and restoring bi_bdev is going to break multipath. When a bio is
remapped and resent multiple times by the target becuase of multiple
path failures, restoring bi_bdev to the original value will cause only
that path to be marked as failed instead of the paths that the bio was
remapped to.

This is DM's cloned bio. Is there a guarantee that this value should be
safe from lower level drivers overwriting it, or is it similar to b_rdev
for buffer_heads?

Mike Christie
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.072 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site