summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2006-05-05 10:06:22 +0000
committerpjd <pjd@FreeBSD.org>2006-05-05 10:06:22 +0000
commit95e02c6359ad9056d48c2521b92e3d68eda42822 (patch)
treea74ae4eec0622767a779dca4a587e46ab01ff773
parent33da3ee9c3b88da5105bda439d455db64e29ec31 (diff)
downloadFreeBSD-src-95e02c6359ad9056d48c2521b92e3d68eda42822.zip
FreeBSD-src-95e02c6359ad9056d48c2521b92e3d68eda42822.tar.gz
- Set bio_done directly to NULL to indicate that we want to wait for the bio.
- Use biowait() instead of copying the code. MFC after: 1 month
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index a00d5e9..66df8d6 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -2254,13 +2254,10 @@ readblock(vp, bp, lbn)
bip->bio_offset = dbtob(fsbtodb(ip->i_fs, blkstofrags(ip->i_fs, lbn)));
bip->bio_data = bp->b_data;
bip->bio_length = bp->b_bcount;
+ bip->bio_done = NULL;
g_io_request(bip, ip->i_devvp->v_bufobj.bo_private);
-
- do
- msleep(bip, NULL, PRIBIO, "snaprdb", hz/10);
- while (!(bip->bio_flags & BIO_DONE));
- bp->b_error = bip->bio_error;
+ bp->b_error = biowait(bip, "snaprdb");
g_destroy_bio(bip);
return (bp->b_error);
}
OpenPOWER on IntegriCloud