aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/raid
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2016-02-17 17:16:02 +0000
committerWarner Losh <imp@FreeBSD.org>2016-02-17 17:16:02 +0000
commitc55f57071a62b7d78a60e4e938b91681cc07ef6a (patch)
tree9d0b9ff9938b0c9fa10bfca4675a8a542491fbe6 /sys/geom/raid
parentddf8a6680eb9506f8bc5e9e41fc8d6f841295823 (diff)
downloadsrc-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.c2
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;