diff options
author | Warner Losh <imp@FreeBSD.org> | 2016-02-17 17:16:02 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2016-02-17 17:16:02 +0000 |
commit | c55f57071a62b7d78a60e4e938b91681cc07ef6a (patch) | |
tree | 9d0b9ff9938b0c9fa10bfca4675a8a542491fbe6 /sys/geom/raid | |
parent | ddf8a6680eb9506f8bc5e9e41fc8d6f841295823 (diff) | |
download | src-c55f57071a62b7d78a60e4e938b91681cc07ef6a.tar.gz src-c55f57071a62b7d78a60e4e938b91681cc07ef6a.zip |
Create an API to reset a struct bio (g_reset_bio). This is mandatory
for all struct bio you get back from g_{new,alloc}_bio. Temporary
bios that you create on the stack or elsewhere should use this before
first use of the bio, and between uses of the bio. At the moment, it
is nothing more than a wrapper around bzero, but that may change in
the future. The wrapper also removes one place where we encode the
size of struct bio in the KBI.
Notes
Notes:
svn path=/head/; revision=295707
Diffstat (limited to 'sys/geom/raid')
-rw-r--r-- | sys/geom/raid/g_raid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/raid/g_raid.c b/sys/geom/raid/g_raid.c index 839a2d46345c..4885319ab094 100644 --- a/sys/geom/raid/g_raid.c +++ b/sys/geom/raid/g_raid.c @@ -1011,7 +1011,7 @@ g_raid_tr_kerneldump_common(struct g_raid_tr_object *tr, vol = tr->tro_volume; sc = vol->v_softc; - bzero(&bp, sizeof(bp)); + g_reset_bio(&bp); bp.bio_cmd = BIO_WRITE; bp.bio_done = g_raid_tr_kerneldump_common_done; bp.bio_attribute = NULL; |