1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-29 16:44:03 +00:00

Clone BIO_ORDERED flag, for disk drivers (namely CAM) that try to

consume it.

Sponsored by: Intel
Discussed with: gibbs, scottl
This commit is contained in:
Jim Harris 2012-08-07 20:16:10 +00:00
parent 1d9db37c77
commit 82a6ae1009
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=239132

View File

@ -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;