summaryrefslogtreecommitdiff
path: root/sys/ufs/ffs
diff options
context:
space:
mode:
authorMartin Natano <natano@cvs.openbsd.org>2016-05-23 09:31:29 +0000
committerMartin Natano <natano@cvs.openbsd.org>2016-05-23 09:31:29 +0000
commit2b41bbf23d3946ce401365b453c3fb26973fb2a1 (patch)
tree241d4ba0e01024a9cc0d1ac304851f8cd0d2f899 /sys/ufs/ffs
parentb4856dcc3b90f04613299ca718ecef538acdf847 (diff)
VOP_REALLOCBLKS() and related code is unused since the removal of
cluster_write(). ok beck zhuk
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r--sys/ufs/ffs/ffs_alloc.c626
-rw-r--r--sys/ufs/ffs/ffs_extern.h7
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c8
-rw-r--r--sys/ufs/ffs/ffs_vnops.c3
4 files changed, 7 insertions, 637 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index 152b42c9f5d..61787119859 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_alloc.c,v 1.106 2015/11/28 21:52:02 beck Exp $ */
+/* $OpenBSD: ffs_alloc.c,v 1.107 2016/05/23 09:31:28 natano Exp $ */
/* $NetBSD: ffs_alloc.c,v 1.11 1996/05/11 18:27:09 mycroft Exp $ */
/*
@@ -66,7 +66,6 @@
daddr_t ffs_alloccg(struct inode *, int, daddr_t, int);
struct buf * ffs_cgread(struct fs *, struct inode *, int);
daddr_t ffs_alloccgblk(struct inode *, struct buf *, daddr_t);
-daddr_t ffs_clusteralloc(struct inode *, int, daddr_t, int);
ufsino_t ffs_dirpref(struct inode *);
daddr_t ffs_fragextend(struct inode *, int, daddr_t, int, int);
daddr_t ffs_hashalloc(struct inode *, int, daddr_t, int,
@@ -74,15 +73,6 @@ daddr_t ffs_hashalloc(struct inode *, int, daddr_t, int,
daddr_t ffs_nodealloccg(struct inode *, int, daddr_t, int);
daddr_t ffs_mapsearch(struct fs *, struct cg *, daddr_t, int);
-int ffs1_reallocblks(void *);
-#ifdef FFS2
-int ffs2_reallocblks(void *);
-#endif
-
-#ifdef DIAGNOSTIC
-int ffs_checkblk(struct inode *, daddr_t, long);
-#endif
-
static const struct timeval fserr_interval = { 2, 0 };
@@ -347,465 +337,6 @@ error:
}
/*
- * Reallocate a sequence of blocks into a contiguous sequence of blocks.
- *
- * The vnode and an array of buffer pointers for a range of sequential
- * logical blocks to be made contiguous are given. The allocator attempts
- * to find a range of sequential blocks starting as close as possible to
- * an fs_rotdelay offset from the end of the allocation for the logical
- * block immediately preceding the current range. If successful, the
- * physical block numbers in the buffer pointers and in the inode are
- * changed to reflect the new allocation. If unsuccessful, the allocation
- * is left unchanged. The success in doing the reallocation is returned.
- * Note that the error return is not reflected back to the user. Rather
- * the previous block allocation will be used.
- */
-
-int doasyncfree = 1;
-int doreallocblks = 1;
-int prtrealloc = 0;
-
-int
-ffs1_reallocblks(void *v)
-{
- struct vop_reallocblks_args *ap = v;
- struct fs *fs;
- struct inode *ip;
- struct vnode *vp;
- struct buf *sbp, *ebp;
- int32_t *bap, *sbap, *ebap = NULL;
- struct cluster_save *buflist;
- daddr_t start_lbn, end_lbn, soff, newblk, blkno;
- struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp;
- int i, len, start_lvl, end_lvl, pref, ssize;
-
- vp = ap->a_vp;
- ip = VTOI(vp);
- fs = ip->i_fs;
- if (fs->fs_contigsumsize <= 0)
- return (ENOSPC);
- buflist = ap->a_buflist;
- len = buflist->bs_nchildren;
- start_lbn = buflist->bs_children[0]->b_lblkno;
- end_lbn = start_lbn + len - 1;
-
-#ifdef DIAGNOSTIC
- for (i = 0; i < len; i++)
- if (!ffs_checkblk(ip,
- dbtofsb(fs, buflist->bs_children[i]->b_blkno), fs->fs_bsize))
- panic("ffs1_reallocblks: unallocated block 1");
-
- for (i = 1; i < len; i++)
- if (buflist->bs_children[i]->b_lblkno != start_lbn + i)
- panic("ffs1_reallocblks: non-logical cluster");
-
- blkno = buflist->bs_children[0]->b_blkno;
- ssize = fsbtodb(fs, fs->fs_frag);
- for (i = 1; i < len - 1; i++)
- if (buflist->bs_children[i]->b_blkno != blkno + (i * ssize))
- panic("ffs1_reallocblks: non-physical cluster %d", i);
-#endif
- /*
- * If the latest allocation is in a new cylinder group, assume that
- * the filesystem has decided to move and do not force it back to
- * the previous cylinder group.
- */
- if (dtog(fs, dbtofsb(fs, buflist->bs_children[0]->b_blkno)) !=
- dtog(fs, dbtofsb(fs, buflist->bs_children[len - 1]->b_blkno)))
- return (ENOSPC);
- if (ufs_getlbns(vp, start_lbn, start_ap, &start_lvl) ||
- ufs_getlbns(vp, end_lbn, end_ap, &end_lvl))
- return (ENOSPC);
- /*
- * Get the starting offset and block map for the first block.
- */
- if (start_lvl == 0) {
- sbap = &ip->i_ffs1_db[0];
- soff = start_lbn;
- } else {
- idp = &start_ap[start_lvl - 1];
- if (bread(vp, idp->in_lbn, (int)fs->fs_bsize, &sbp)) {
- brelse(sbp);
- return (ENOSPC);
- }
- sbap = (int32_t *)sbp->b_data;
- soff = idp->in_off;
- }
- /*
- * Find the preferred location for the cluster.
- */
- pref = ffs1_blkpref(ip, start_lbn, soff, sbap);
- /*
- * If the block range spans two block maps, get the second map.
- */
- if (end_lvl == 0 || (idp = &end_ap[end_lvl - 1])->in_off + 1 >= len) {
- ssize = len;
- } else {
-#ifdef DIAGNOSTIC
- if (start_lvl > 1 &&
- start_ap[start_lvl-1].in_lbn == idp->in_lbn)
- panic("ffs1_reallocblk: start == end");
-#endif
- ssize = len - (idp->in_off + 1);
- if (bread(vp, idp->in_lbn, (int)fs->fs_bsize, &ebp))
- goto fail;
- ebap = (int32_t *)ebp->b_data;
- }
- /*
- * Search the block map looking for an allocation of the desired size.
- */
- if ((newblk = ffs_hashalloc(ip, dtog(fs, pref), pref, len,
- ffs_clusteralloc)) == 0)
- goto fail;
- /*
- * We have found a new contiguous block.
- *
- * First we have to replace the old block pointers with the new
- * block pointers in the inode and indirect blocks associated
- * with the file.
- */
-#ifdef DEBUG
- if (prtrealloc)
- printf("realloc: ino %u, lbns %lld-%lld\n\told:", ip->i_number,
- (long long)start_lbn, (long long)end_lbn);
-#endif
- blkno = newblk;
- for (bap = &sbap[soff], i = 0; i < len; i++, blkno += fs->fs_frag) {
- if (i == ssize) {
- bap = ebap;
- soff = -i;
- }
-#ifdef DIAGNOSTIC
- if (!ffs_checkblk(ip,
- dbtofsb(fs, buflist->bs_children[i]->b_blkno), fs->fs_bsize))
- panic("ffs1_reallocblks: unallocated block 2");
- if (dbtofsb(fs, buflist->bs_children[i]->b_blkno) != *bap)
- panic("ffs1_reallocblks: alloc mismatch");
-#endif
-#ifdef DEBUG
- if (prtrealloc)
- printf(" %d,", *bap);
-#endif
- if (DOINGSOFTDEP(vp)) {
- if (sbap == &ip->i_ffs1_db[0] && i < ssize)
- softdep_setup_allocdirect(ip, start_lbn + i,
- blkno, *bap, fs->fs_bsize, fs->fs_bsize,
- buflist->bs_children[i]);
- else
- softdep_setup_allocindir_page(ip, start_lbn + i,
- i < ssize ? sbp : ebp, soff + i, blkno,
- *bap, buflist->bs_children[i]);
- }
-
- *bap++ = blkno;
- }
- /*
- * Next we must write out the modified inode and indirect blocks.
- * For strict correctness, the writes should be synchronous since
- * the old block values may have been written to disk. In practise
- * they are almost never written, but if we are concerned about
- * strict correctness, the `doasyncfree' flag should be set to zero.
- *
- * The test on `doasyncfree' should be changed to test a flag
- * that shows whether the associated buffers and inodes have
- * been written. The flag should be set when the cluster is
- * started and cleared whenever the buffer or inode is flushed.
- * We can then check below to see if it is set, and do the
- * synchronous write only when it has been cleared.
- */
- if (sbap != &ip->i_ffs1_db[0]) {
- if (doasyncfree)
- bdwrite(sbp);
- else
- bwrite(sbp);
- } else {
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- if (!doasyncfree) {
- UFS_UPDATE(ip, 1);
- }
- }
- if (ssize < len) {
- if (doasyncfree)
- bdwrite(ebp);
- else
- bwrite(ebp);
- }
- /*
- * Last, free the old blocks and assign the new blocks to the buffers.
- */
-#ifdef DEBUG
- if (prtrealloc)
- printf("\n\tnew:");
-#endif
- for (blkno = newblk, i = 0; i < len; i++, blkno += fs->fs_frag) {
- if (!DOINGSOFTDEP(vp))
- ffs_blkfree(ip,
- dbtofsb(fs, buflist->bs_children[i]->b_blkno),
- fs->fs_bsize);
- buflist->bs_children[i]->b_blkno = fsbtodb(fs, blkno);
-#ifdef DIAGNOSTIC
- if (!ffs_checkblk(ip,
- dbtofsb(fs, buflist->bs_children[i]->b_blkno), fs->fs_bsize))
- panic("ffs1_reallocblks: unallocated block 3");
- if (prtrealloc)
- printf(" %lld,", (long long)blkno);
-#endif
- }
-#ifdef DEBUG
- if (prtrealloc) {
- prtrealloc--;
- printf("\n");
- }
-#endif
- return (0);
-
-fail:
- if (ssize < len)
- brelse(ebp);
- if (sbap != &ip->i_ffs1_db[0])
- brelse(sbp);
- return (ENOSPC);
-}
-
-#ifdef FFS2
-int
-ffs2_reallocblks(void *v)
-{
- struct vop_reallocblks_args *ap = v;
- struct fs *fs;
- struct inode *ip;
- struct vnode *vp;
- struct buf *sbp, *ebp;
- daddr_t *bap, *sbap, *ebap = NULL;
- struct cluster_save *buflist;
- daddr_t start_lbn, end_lbn;
- daddr_t soff, newblk, blkno, pref;
- struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp;
- int i, len, start_lvl, end_lvl, ssize;
-
- vp = ap->a_vp;
- ip = VTOI(vp);
- fs = ip->i_fs;
-
- if (fs->fs_contigsumsize <= 0)
- return (ENOSPC);
-
- buflist = ap->a_buflist;
- len = buflist->bs_nchildren;
- start_lbn = buflist->bs_children[0]->b_lblkno;
- end_lbn = start_lbn + len - 1;
-
-#ifdef DIAGNOSTIC
- for (i = 0; i < len; i++)
- if (!ffs_checkblk(ip,
- dbtofsb(fs, buflist->bs_children[i]->b_blkno), fs->fs_bsize))
- panic("ffs2_reallocblks: unallocated block 1");
-
- for (i = 1; i < len; i++)
- if (buflist->bs_children[i]->b_lblkno != start_lbn + i)
- panic("ffs2_reallocblks: non-logical cluster");
-
- blkno = buflist->bs_children[0]->b_blkno;
- ssize = fsbtodb(fs, fs->fs_frag);
-
- for (i = 1; i < len - 1; i++)
- if (buflist->bs_children[i]->b_blkno != blkno + (i * ssize))
- panic("ffs2_reallocblks: non-physical cluster %d", i);
-#endif
-
- /*
- * If the latest allocation is in a new cylinder group, assume that
- * the filesystem has decided to move and do not force it back to
- * the previous cylinder group.
- */
- if (dtog(fs, dbtofsb(fs, buflist->bs_children[0]->b_blkno)) !=
- dtog(fs, dbtofsb(fs, buflist->bs_children[len - 1]->b_blkno)))
- return (ENOSPC);
- if (ufs_getlbns(vp, start_lbn, start_ap, &start_lvl) ||
- ufs_getlbns(vp, end_lbn, end_ap, &end_lvl))
- return (ENOSPC);
-
- /*
- * Get the starting offset and block map for the first block.
- */
- if (start_lvl == 0) {
- sbap = &ip->i_din2->di_db[0];
- soff = start_lbn;
- } else {
- idp = &start_ap[start_lvl - 1];
- if (bread(vp, idp->in_lbn, (int)fs->fs_bsize, &sbp)) {
- brelse(sbp);
- return (ENOSPC);
- }
- sbap = (daddr_t *)sbp->b_data;
- soff = idp->in_off;
- }
-
- /*
- * If the block range spans two block maps, get the second map.
- */
- if (end_lvl == 0 || (idp = &end_ap[end_lvl - 1])->in_off + 1 >= len) {
- ssize = len;
- } else {
-#ifdef DIAGNOSTIC
- if (start_ap[start_lvl-1].in_lbn == idp->in_lbn)
- panic("ffs2_reallocblk: start == end");
-#endif
- ssize = len - (idp->in_off + 1);
- if (bread(vp, idp->in_lbn, (int)fs->fs_bsize, &ebp))
- goto fail;
- ebap = (daddr_t *)ebp->b_data;
- }
-
- /*
- * Find the preferred location for the cluster.
- */
- pref = ffs2_blkpref(ip, start_lbn, soff, sbap);
-
- /*
- * Search the block map looking for an allocation of the desired size.
- */
- if ((newblk = ffs_hashalloc(ip, dtog(fs, pref), pref,
- len, ffs_clusteralloc)) == 0)
- goto fail;
-
- /*
- * We have found a new contiguous block.
- *
- * First we have to replace the old block pointers with the new
- * block pointers in the inode and indirect blocks associated
- * with the file.
- */
-#ifdef DEBUG
- if (prtrealloc)
- printf("realloc: ino %u, lbns %lld-%lld\n\told:", ip->i_number,
- (long long)start_lbn, (long long)end_lbn);
-#endif
-
- blkno = newblk;
-
- for (bap = &sbap[soff], i = 0; i < len; i++, blkno += fs->fs_frag) {
- if (i == ssize) {
- bap = ebap;
- soff = -i;
- }
-#ifdef DIAGNOSTIC
- if (!ffs_checkblk(ip,
- dbtofsb(fs, buflist->bs_children[i]->b_blkno), fs->fs_bsize))
- panic("ffs2_reallocblks: unallocated block 2");
- if (dbtofsb(fs, buflist->bs_children[i]->b_blkno) != *bap)
- panic("ffs2_reallocblks: alloc mismatch");
-#endif
-#ifdef DEBUG
- if (prtrealloc)
- printf(" %lld,", (long long)*bap);
-#endif
- if (DOINGSOFTDEP(vp)) {
- if (sbap == &ip->i_din2->di_db[0] && i < ssize)
- softdep_setup_allocdirect(ip, start_lbn + i,
- blkno, *bap, fs->fs_bsize, fs->fs_bsize,
- buflist->bs_children[i]);
- else
- softdep_setup_allocindir_page(ip, start_lbn + i,
- i < ssize ? sbp : ebp, soff + i, blkno,
- *bap, buflist->bs_children[i]);
- }
- *bap++ = blkno;
- }
-
- /*
- * Next we must write out the modified inode and indirect blocks.
- * For strict correctness, the writes should be synchronous since
- * the old block values may have been written to disk. In practise
- * they are almost never written, but if we are concerned about
- * strict correctness, the `doasyncfree' flag should be set to zero.
- *
- * The test on `doasyncfree' should be changed to test a flag
- * that shows whether the associated buffers and inodes have
- * been written. The flag should be set when the cluster is
- * started and cleared whenever the buffer or inode is flushed.
- * We can then check below to see if it is set, and do the
- * synchronous write only when it has been cleared.
- */
- if (sbap != &ip->i_din2->di_db[0]) {
- if (doasyncfree)
- bdwrite(sbp);
- else
- bwrite(sbp);
- } else {
- ip->i_flag |= IN_CHANGE | IN_UPDATE;
- if (!doasyncfree)
- ffs_update(ip, 1);
- }
-
- if (ssize < len) {
- if (doasyncfree)
- bdwrite(ebp);
- else
- bwrite(ebp);
- }
-
- /*
- * Last, free the old blocks and assign the new blocks to the buffers.
- */
-#ifdef DEBUG
- if (prtrealloc)
- printf("\n\tnew:");
-#endif
- for (blkno = newblk, i = 0; i < len; i++, blkno += fs->fs_frag) {
- if (!DOINGSOFTDEP(vp))
- ffs_blkfree(ip, dbtofsb(fs,
- buflist->bs_children[i]->b_blkno), fs->fs_bsize);
- buflist->bs_children[i]->b_blkno = fsbtodb(fs, blkno);
-#ifdef DIAGNOSTIC
- if (!ffs_checkblk(ip,
- dbtofsb(fs, buflist->bs_children[i]->b_blkno), fs->fs_bsize))
- panic("ffs2_reallocblks: unallocated block 3");
-#endif
-#ifdef DEBUG
- if (prtrealloc)
- printf(" %lld,", (long long)blkno);
-#endif
- }
-#ifdef DEBUG
- if (prtrealloc) {
- prtrealloc--;
- printf("\n");
- }
-#endif
-
- return (0);
-
-fail:
- if (ssize < len)
- brelse(ebp);
-
- if (sbap != &ip->i_din2->di_db[0])
- brelse(sbp);
-
- return (ENOSPC);
-}
-#endif /* FFS2 */
-
-int
-ffs_reallocblks(void *v)
-{
-#ifdef FFS2
- struct vop_reallocblks_args *ap = v;
-#endif
-
- if (!doreallocblks)
- return (ENOSPC);
-
-#ifdef FFS2
- if (VTOI(ap->a_vp)->i_ump->um_fstype == UM_UFS2)
- return (ffs2_reallocblks(v));
-#endif
-
- return (ffs1_reallocblks(v));
-}
-
-/*
* Allocate an inode in the file system.
*
* If allocating a directory, use ffs_dirpref to select the inode.
@@ -1548,119 +1079,6 @@ gotit:
return (blkno);
}
-/*
- * Determine whether a cluster can be allocated.
- *
- * We do not currently check for optimal rotational layout if there
- * are multiple choices in the same cylinder group. Instead we just
- * take the first one that we find following bpref.
- */
-daddr_t
-ffs_clusteralloc(struct inode *ip, int cg, daddr_t bpref, int len)
-{
- struct fs *fs;
- struct cg *cgp;
- struct buf *bp;
- int i, got, run, bno, bit, map;
- u_char *mapp;
- int32_t *lp;
-
- fs = ip->i_fs;
- if (fs->fs_maxcluster[cg] < len)
- return (0);
-
- if (!(bp = ffs_cgread(fs, ip, cg)))
- return (0);
-
- cgp = (struct cg *)bp->b_data;
-
- /*
- * Check to see if a cluster of the needed size (or bigger) is
- * available in this cylinder group.
- */
- lp = &cg_clustersum(cgp)[len];
- for (i = len; i <= fs->fs_contigsumsize; i++)
- if (*lp++ > 0)
- break;
- if (i > fs->fs_contigsumsize) {
- /*
- * This is the first time looking for a cluster in this
- * cylinder group. Update the cluster summary information
- * to reflect the true maximum sized cluster so that
- * future cluster allocation requests can avoid reading
- * the cylinder group map only to find no clusters.
- */
- lp = &cg_clustersum(cgp)[len - 1];
- for (i = len - 1; i > 0; i--)
- if (*lp-- > 0)
- break;
- fs->fs_maxcluster[cg] = i;
- goto fail;
- }
- /*
- * Search the cluster map to find a big enough cluster.
- * We take the first one that we find, even if it is larger
- * than we need as we prefer to get one close to the previous
- * block allocation. We do not search before the current
- * preference point as we do not want to allocate a block
- * that is allocated before the previous one (as we will
- * then have to wait for another pass of the elevator
- * algorithm before it will be read). We prefer to fail and
- * be recalled to try an allocation in the next cylinder group.
- */
- if (dtog(fs, bpref) != cg)
- bpref = cgdata(fs, cg);
- else
- bpref = blknum(fs, bpref);
- bpref = fragstoblks(fs, dtogd(fs, bpref));
- mapp = &cg_clustersfree(cgp)[bpref / NBBY];
- map = *mapp++;
- bit = 1 << (bpref % NBBY);
- for (run = 0, got = bpref; got < cgp->cg_nclusterblks; got++) {
- if ((map & bit) == 0) {
- run = 0;
- } else {
- run++;
- if (run == len)
- break;
- }
- if ((got & (NBBY - 1)) != (NBBY - 1)) {
- bit <<= 1;
- } else {
- map = *mapp++;
- bit = 1;
- }
- }
- if (got >= cgp->cg_nclusterblks)
- goto fail;
- /*
- * Allocate the cluster that we have found.
- */
- cgp->cg_ffs2_time = cgp->cg_time = time_second;
-
-#ifdef DIAGNOSTIC
- for (i = 1; i <= len; i++)
- if (!ffs_isblock(fs, cg_blksfree(cgp), got - run + i))
- panic("ffs_clusteralloc: map mismatch");
-#endif
- bno = cgbase(fs, cg) + blkstofrags(fs, got - run + 1);
-#ifdef DIAGNOSTIC
- if (dtog(fs, bno) != cg)
- panic("ffs_clusteralloc: allocated out of group");
-#endif
-
- len = blkstofrags(fs, len);
- for (i = 0; i < len; i += fs->fs_frag)
- if (ffs_alloccgblk(ip, bp, bno + i) != bno + i)
- panic("ffs_clusteralloc: lost block");
- bdwrite(bp);
- return (bno);
-
-fail:
- brelse(bp);
- return (0);
-}
-
/* inode allocation routine */
daddr_t
ffs_nodealloccg(struct inode *ip, int cg, daddr_t ipref, int mode)
@@ -1986,48 +1404,6 @@ ffs_freefile(struct inode *pip, ufsino_t ino, mode_t mode)
return (0);
}
-#ifdef DIAGNOSTIC
-/*
- * Verify allocation of a block or fragment. Returns true if block or
- * fragment is allocated, false if it is free.
- */
-int
-ffs_checkblk(struct inode *ip, daddr_t bno, long size)
-{
- struct fs *fs;
- struct cg *cgp;
- struct buf *bp;
- int i, frags, free;
-
- fs = ip->i_fs;
- if ((u_int)size > fs->fs_bsize || fragoff(fs, size) != 0) {
- printf("bsize = %d, size = %ld, fs = %s\n",
- fs->fs_bsize, size, fs->fs_fsmnt);
- panic("ffs_checkblk: bad size");
- }
- if ((u_int)bno >= fs->fs_size)
- panic("ffs_checkblk: bad block %lld", (long long)bno);
-
- if (!(bp = ffs_cgread(fs, ip, dtog(fs, bno))))
- return (0);
-
- cgp = (struct cg *)bp->b_data;
- bno = dtogd(fs, bno);
- if (size == fs->fs_bsize) {
- free = ffs_isblock(fs, cg_blksfree(cgp), fragstoblks(fs, bno));
- } else {
- frags = numfrags(fs, size);
- for (free = 0, i = 0; i < frags; i++)
- if (isset(cg_blksfree(cgp), bno + i))
- free++;
- if (free != 0 && free != frags)
- panic("ffs_checkblk: partially free fragment");
- }
- brelse(bp);
- return (!free);
-}
-#endif /* DIAGNOSTIC */
-
/*
* Find a block of the specified size in the specified cylinder group.
diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h
index 85aa2c30466..ecb37e464ff 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.41 2016/01/12 11:41:00 mpi Exp $ */
+/* $OpenBSD: ffs_extern.h,v 1.42 2016/05/23 09:31:28 natano Exp $ */
/* $NetBSD: ffs_extern.h,v 1.4 1996/02/09 22:22:22 christos Exp $ */
/*
@@ -57,8 +57,8 @@
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
- { "doreallocblks", CTLTYPE_INT }, \
- { "doasyncfree", CTLTYPE_INT }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
{ "max_softdeps", CTLTYPE_INT }, \
{ "sd_tickdelay", CTLTYPE_INT }, \
{ "sd_worklist_push", CTLTYPE_INT }, \
@@ -103,7 +103,6 @@ int ffs_alloc(struct inode *, daddr_t, daddr_t , int, struct ucred *,
daddr_t *);
int ffs_realloccg(struct inode *, daddr_t, daddr_t, int, int ,
struct ucred *, struct buf **, daddr_t *);
-int ffs_reallocblks(void *);
int ffs_inode_alloc(struct inode *, mode_t, struct ucred *, struct vnode **);
int ffs_inode_free(struct inode *, ufsino_t, mode_t);
int ffs_freefile(struct inode *, ufsino_t, mode_t);
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 1768b0c6412..9ee397121b9 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vfsops.c,v 1.157 2016/05/22 20:27:04 bluhm Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.158 2016/05/23 09:31:28 natano Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
@@ -1541,7 +1541,6 @@ int
ffs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
size_t newlen, struct proc *p)
{
- extern int doreallocblks, doasyncfree;
#ifdef FFS_SOFTUPDATES
extern int max_softdeps, tickdelay, stat_worklist_push;
extern int stat_blk_limit_push, stat_ino_limit_push, stat_blk_limit_hit;
@@ -1556,12 +1555,9 @@ ffs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
switch (name[0]) {
case FFS_CLUSTERREAD:
case FFS_CLUSTERWRITE:
- return (EOPNOTSUPP);
case FFS_REALLOCBLKS:
- return (sysctl_int(oldp, oldlenp, newp, newlen,
- &doreallocblks));
case FFS_ASYNCFREE:
- return (sysctl_int(oldp, oldlenp, newp, newlen, &doasyncfree));
+ return (EOPNOTSUPP);
#ifdef FFS_SOFTUPDATES
case FFS_MAX_SOFTDEPS:
return (sysctl_int(oldp, oldlenp, newp, newlen, &max_softdeps));
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index 63e211542c1..a855bb929e9 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vnops.c,v 1.86 2016/04/07 11:13:01 mpi Exp $ */
+/* $OpenBSD: ffs_vnops.c,v 1.87 2016/05/23 09:31:28 natano Exp $ */
/* $NetBSD: ffs_vnops.c,v 1.7 1996/05/11 18:27:24 mycroft Exp $ */
/*
@@ -93,7 +93,6 @@ struct vops ffs_vops = {
.vop_islocked = ufs_islocked,
.vop_pathconf = ufs_pathconf,
.vop_advlock = ufs_advlock,
- .vop_reallocblks = ffs_reallocblks,
.vop_bwrite = vop_generic_bwrite
};