summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2015-09-11 00:38:58 +0000
committerimp <imp@FreeBSD.org>2015-09-11 00:38:58 +0000
commit9fcb42ef36e530a78daecd5b2693d6223581a650 (patch)
tree12af36b567feeb5dd9081fd7aa5da7cdd695b113
parent9567ee23d9b3f232f961bf92dba4b8d2c222b2b2 (diff)
downloadFreeBSD-src-9fcb42ef36e530a78daecd5b2693d6223581a650.zip
FreeBSD-src-9fcb42ef36e530a78daecd5b2693d6223581a650.tar.gz
dev_strategy and dev_strategy_csw are unused since r281825. Remove
them. Differential Revision: https://reviews.freebsd.org/D3620
-rw-r--r--sys/kern/vfs_bio.c50
-rw-r--r--sys/sys/conf.h2
2 files changed, 0 insertions, 52 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 5f68bde..33e0e4a 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -3786,56 +3786,6 @@ bufdonebio(struct bio *bip)
g_destroy_bio(bip);
}
-void
-dev_strategy(struct cdev *dev, struct buf *bp)
-{
- struct cdevsw *csw;
- int ref;
-
- KASSERT(dev->si_refcount > 0,
- ("dev_strategy on un-referenced struct cdev *(%s) %p",
- devtoname(dev), dev));
-
- csw = dev_refthread(dev, &ref);
- dev_strategy_csw(dev, csw, bp);
- dev_relthread(dev, ref);
-}
-
-void
-dev_strategy_csw(struct cdev *dev, struct cdevsw *csw, struct buf *bp)
-{
- struct bio *bip;
-
- KASSERT(bp->b_iocmd == BIO_READ || bp->b_iocmd == BIO_WRITE,
- ("b_iocmd botch"));
- KASSERT(((dev->si_flags & SI_ETERNAL) != 0 && csw != NULL) ||
- dev->si_threadcount > 0,
- ("dev_strategy_csw threadcount cdev *(%s) %p", devtoname(dev),
- dev));
- if (csw == NULL) {
- bp->b_error = ENXIO;
- bp->b_ioflags = BIO_ERROR;
- bufdone(bp);
- return;
- }
- for (;;) {
- bip = g_new_bio();
- if (bip != NULL)
- break;
- /* Try again later */
- tsleep(&bp, PRIBIO, "dev_strat", hz/10);
- }
- bip->bio_cmd = bp->b_iocmd;
- bip->bio_offset = bp->b_iooffset;
- bip->bio_length = bp->b_bcount;
- bip->bio_bcount = bp->b_bcount; /* XXX: remove */
- bdata2bio(bp, bip);
- bip->bio_done = bufdonebio;
- bip->bio_caller2 = bp;
- bip->bio_dev = dev;
- (*csw->d_strategy)(bip);
-}
-
/*
* bufdone:
*
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index d821703..4001822 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -240,8 +240,6 @@ void dev_depends(struct cdev *_pdev, struct cdev *_cdev);
void dev_ref(struct cdev *dev);
void dev_refl(struct cdev *dev);
void dev_rel(struct cdev *dev);
-void dev_strategy(struct cdev *dev, struct buf *bp);
-void dev_strategy_csw(struct cdev *dev, struct cdevsw *csw, struct buf *bp);
struct cdev *make_dev(struct cdevsw *_devsw, int _unit, uid_t _uid, gid_t _gid,
int _perms, const char *_fmt, ...) __printflike(6, 7);
struct cdev *make_dev_cred(struct cdevsw *_devsw, int _unit,
OpenPOWER on IntegriCloud