diff options
author | jimharris <jimharris@FreeBSD.org> | 2012-08-07 20:16:10 +0000 |
---|---|---|
committer | jimharris <jimharris@FreeBSD.org> | 2012-08-07 20:16:10 +0000 |
commit | 187bdeb55e1bfd6164489785cff4a64883d61576 (patch) | |
tree | bfa7bc0e566255e5b0357ec10b3801f8e66ec508 /sys/geom | |
parent | be00f071cddc9f9c2bbae5eb596284e01d71a525 (diff) | |
download | FreeBSD-src-187bdeb55e1bfd6164489785cff4a64883d61576.zip FreeBSD-src-187bdeb55e1bfd6164489785cff4a64883d61576.tar.gz |
Clone BIO_ORDERED flag, for disk drivers (namely CAM) that try to
consume it.
Sponsored by: Intel
Discussed with: gibbs, scottl
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_io.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index 1e0f28e..0294887 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -177,6 +177,12 @@ g_clone_bio(struct bio *bp) if (bp2 != NULL) { bp2->bio_parent = bp; bp2->bio_cmd = bp->bio_cmd; + /* + * BIO_ORDERED flag may be used by disk drivers to enforce + * ordering restrictions, so this flag needs to be cloned. + * Other bio flags are not suitable for cloning. + */ + bp2->bio_flags = bp->bio_flags & BIO_ORDERED; bp2->bio_length = bp->bio_length; bp2->bio_offset = bp->bio_offset; bp2->bio_data = bp->bio_data; |