Do not fetch precise time of request start when stats collection disabled.

Reviewed by:	pjd, phk
This commit is contained in:
Alexander Motin 2010-03-24 18:04:25 +00:00
parent 438be77d54
commit a5be8eb530

View File

@ -443,7 +443,10 @@ g_io_request(struct bio *bp, struct g_consumer *cp)
("Bio already on queue bp=%p", bp));
bp->bio_flags |= BIO_ONQUEUE;
binuptime(&bp->bio_t0);
if (g_collectstats)
binuptime(&bp->bio_t0);
else
getbinuptime(&bp->bio_t0);
/*
* The statistics collection is lockless, as such, but we