summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2015-07-29 02:26:57 +0000
committerjeff <jeff@FreeBSD.org>2015-07-29 02:26:57 +0000
commit44267026a04d5bba6872796d13bd9f9e83d859fe (patch)
treee9966ad4053c5c0df0210f4462f86f0738d97db8 /sys/ufs
parent03740b1f15c083c9058fad53a6043321b852a200 (diff)
downloadFreeBSD-src-44267026a04d5bba6872796d13bd9f9e83d859fe.zip
FreeBSD-src-44267026a04d5bba6872796d13bd9f9e83d859fe.tar.gz
- Make 'struct buf *buf' private to vfs_bio.c. Having a global variable
'buf' is inconvenient and has lead me to some irritating to discover bugs over the years. It also makes it more challenging to refactor the buf allocation system. - Move swbuf and declare it as an extern in vfs_bio.c. This is still not perfect but better than it was before. - Eliminate the unused ffs function that relied on knowledge of the buf array. - Move the shutdown code that iterates over the buf array into vfs_bio.c. Reviewed by: kib Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_subr.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c
index e2460a3..67f7e5c 100644
--- a/sys/ufs/ffs/ffs_subr.c
+++ b/sys/ufs/ffs/ffs_subr.c
@@ -55,10 +55,6 @@ __FBSDID("$FreeBSD$");
#include <ufs/ffs/ffs_extern.h>
#include <ufs/ffs/fs.h>
-#ifdef KDB
-void ffs_checkoverlap(struct buf *, struct inode *);
-#endif
-
/*
* Return buffer with the contents of block "offset" from the beginning of
* directory "ip". If "res" is non-zero, fill it in with a pointer to the
@@ -165,37 +161,6 @@ ffs_fragacct(fs, fragmap, fraglist, cnt)
}
}
-#ifdef KDB
-void
-ffs_checkoverlap(bp, ip)
- struct buf *bp;
- struct inode *ip;
-{
- struct buf *ebp, *ep;
- ufs2_daddr_t start, last;
- struct vnode *vp;
-
- ebp = &buf[nbuf];
- start = bp->b_blkno;
- last = start + btodb(bp->b_bcount) - 1;
- for (ep = buf; ep < ebp; ep++) {
- if (ep == bp || (ep->b_flags & B_INVAL) ||
- ep->b_vp == NULLVP)
- continue;
- vp = ip->i_devvp;
- /* look for overlap */
- if (ep->b_bcount == 0 || ep->b_blkno > last ||
- ep->b_blkno + btodb(ep->b_bcount) <= start)
- continue;
- vprint("Disk overlap", vp);
- printf("\tstart %jd, end %jd overlap start %jd, end %jd\n",
- (intmax_t)start, (intmax_t)last, (intmax_t)ep->b_blkno,
- (intmax_t)(ep->b_blkno + btodb(ep->b_bcount) - 1));
- panic("ffs_checkoverlap: Disk buffer overlap");
- }
-}
-#endif /* KDB */
-
/*
* block operations
*
OpenPOWER on IntegriCloud