diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-10-08 02:58:27 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-10-08 02:58:27 +0000 |
commit | 51642cfddd32df8e53f2008fe7b5aafd930fa4f1 (patch) | |
tree | 0c182120ac2fd1116a19e4814bc002261aa7f70a /sys/ufs | |
parent | d67f700dd2aead8501858ac691042c30c67a9641 (diff) |
remove unused ffs_checkoverlap() ext2fs_checkoverlap(); ok miod@
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_extern.h | 5 | ||||
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_subr.c | 33 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_extern.h | 5 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_subr.c | 34 |
4 files changed, 4 insertions, 73 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_extern.h b/sys/ufs/ext2fs/ext2fs_extern.h index ca4003a4f40..f74dbc760d3 100644 --- a/sys/ufs/ext2fs/ext2fs_extern.h +++ b/sys/ufs/ext2fs/ext2fs_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_extern.h,v 1.38 2020/01/20 23:21:56 claudio Exp $ */ +/* $OpenBSD: ext2fs_extern.h,v 1.39 2024/10/08 02:58:26 jsg Exp $ */ /* $NetBSD: ext2fs_extern.h,v 1.1 1997/06/11 09:33:55 bouyer Exp $ */ /*- @@ -92,9 +92,6 @@ int ext2fs_checkpath(struct inode *, struct inode *, struct ucred *); /* ext2fs_subr.c */ int ext2fs_bufatoff(struct inode *, off_t, char **, struct buf **); int ext2fs_vinit(struct mount *, struct vnode **); -#ifdef DIAGNOSTIC -void ext2fs_checkoverlap(struct buf *, struct inode *); -#endif /* ext2fs_vfsops.c */ int ext2fs_mountroot(void); diff --git a/sys/ufs/ext2fs/ext2fs_subr.c b/sys/ufs/ext2fs/ext2fs_subr.c index b03939be476..68769d8f28a 100644 --- a/sys/ufs/ext2fs/ext2fs_subr.c +++ b/sys/ufs/ext2fs/ext2fs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_subr.c,v 1.37 2021/10/20 06:35:39 semarie Exp $ */ +/* $OpenBSD: ext2fs_subr.c,v 1.38 2024/10/08 02:58:26 jsg Exp $ */ /* $NetBSD: ext2fs_subr.c,v 1.1 1997/06/11 09:34:03 bouyer Exp $ */ /* @@ -110,37 +110,6 @@ ext2fs_bufatoff(struct inode *ip, off_t offset, char **res, struct buf **bpp) } #endif -#if defined(_KERNEL) && defined(DIAGNOSTIC) -void -ext2fs_checkoverlap(struct buf *bp, struct inode *ip) -{ - struct buf *ep; - struct vnode *vp; - daddr_t start, last; - - start = bp->b_blkno; - last = start + btodb(bp->b_bcount) - 1; - LIST_FOREACH(ep, &bufhead, b_list) { - if (ep == bp || (ep->b_flags & B_INVAL) || - ep->b_vp == NULLVP) - continue; - if (VOP_BMAP(ep->b_vp, 0, &vp, NULL, NULL)) - continue; - if (vp != ip->i_devvp) - continue; - /* 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 %lld, end %lld overlap start %lld, end %lld\n", - start, last, (long long)ep->b_blkno, - (long long)(ep->b_blkno + btodb(ep->b_bcount) - 1)); - panic("Disk buffer overlap"); - } -} -#endif /* DIAGNOSTIC */ - /* * Initialize the vnode associated with a new inode, handle aliased vnodes. */ diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h index 88bf59dd7be..33329f213ec 100644 --- a/sys/ufs/ffs/ffs_extern.h +++ b/sys/ufs/ffs/ffs_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_extern.h,v 1.50 2024/05/13 01:15:53 jsg Exp $ */ +/* $OpenBSD: ffs_extern.h,v 1.51 2024/10/08 02:58:26 jsg Exp $ */ /* $NetBSD: ffs_extern.h,v 1.4 1996/02/09 22:22:22 christos Exp $ */ /* @@ -125,9 +125,6 @@ int ffs_truncate(struct inode *, off_t, int, struct ucred *); /* ffs_subr.c */ int ffs_bufatoff(struct inode *, off_t, char **, struct buf **); void ffs_fragacct(struct fs *, int, int32_t[], int); -#ifdef DIAGNOSTIC -void ffs_checkoverlap(struct buf *, struct inode *); -#endif int ffs_isfreeblock(struct fs *, u_char *, daddr_t); int ffs_isblock(struct fs *, u_char *, daddr_t); void ffs_clrblock(struct fs *, u_char *, daddr_t); diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c index 64d353860a3..de81df8b619 100644 --- a/sys/ufs/ffs/ffs_subr.c +++ b/sys/ufs/ffs/ffs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_subr.c,v 1.34 2021/10/20 06:35:39 semarie Exp $ */ +/* $OpenBSD: ffs_subr.c,v 1.35 2024/10/08 02:58:26 jsg Exp $ */ /* $NetBSD: ffs_subr.c,v 1.6 1996/03/17 02:16:23 christos Exp $ */ /* @@ -119,38 +119,6 @@ ffs_fragacct(struct fs *fs, int fragmap, int32_t fraglist[], int cnt) } } -#if defined(_KERNEL) && defined(DIAGNOSTIC) -void -ffs_checkoverlap(struct buf *bp, struct inode *ip) -{ - daddr_t start, last; - struct vnode *vp; - struct buf *ep; - - start = bp->b_blkno; - last = start + btodb(bp->b_bcount) - 1; - LIST_FOREACH(ep, &bufhead, b_list) { - if (ep == bp || (ep->b_flags & B_INVAL) || - ep->b_vp == NULLVP) - continue; - if (VOP_BMAP(ep->b_vp, 0, &vp, NULL, NULL)) - continue; - if (vp != ip->i_devvp) - continue; - /* 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); - (void)printf("\tstart %lld, end %lld overlap start %llu, " - "end %llu\n", (long long)start, (long long)last, - (long long)ep->b_blkno, - (long long)(ep->b_blkno + btodb(ep->b_bcount) - 1)); - panic("Disk buffer overlap"); - } -} -#endif /* DIAGNOSTIC */ - /* * block operations * |