diff options
Diffstat (limited to 'sys/ufs/ffs/ffs_alloc.c')
-rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 2794e32be0884..bd127db179f1e 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_alloc.c 8.18 (Berkeley) 5/26/95 - * $Id: ffs_alloc.c,v 1.55 1999/01/06 17:04:33 bde Exp $ + * $Id: ffs_alloc.c,v 1.52 1998/09/05 14:13:12 phk Exp $ */ #include "opt_quota.h" @@ -42,13 +42,13 @@ #include <sys/proc.h> #include <sys/vnode.h> #include <sys/mount.h> -#include <sys/kernel.h> +#ifdef notyet #include <sys/sysctl.h> +#endif #include <sys/syslog.h> #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> -#include <ufs/ufs/ufs_extern.h> #include <ufs/ufs/ufsmount.h> #include <ufs/ffs/fs.h> @@ -65,8 +65,10 @@ static int ffs_checkblk __P((struct inode *, ufs_daddr_t, long)); #endif static void ffs_clusteracct __P((struct fs *, struct cg *, ufs_daddr_t, int)); +#ifdef notyet static ufs_daddr_t ffs_clusteralloc __P((struct inode *, int, ufs_daddr_t, int)); +#endif static ino_t ffs_dirpref __P((struct fs *)); static ufs_daddr_t ffs_fragextend __P((struct inode *, int, long, int, int)); static void ffs_fserr __P((struct fs *, u_int, char *)); @@ -321,6 +323,7 @@ nospace: return (ENOSPC); } +#ifdef notyet SYSCTL_NODE(_vfs, OID_AUTO, ffs, CTLFLAG_RW, 0, "FFS filesystem"); /* @@ -343,8 +346,7 @@ SYSCTL_INT(_vfs_ffs, FFS_ASYNCFREE, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, "" static int doreallocblks = 1; SYSCTL_INT(_vfs_ffs, FFS_REALLOCBLKS, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, ""); -#ifdef DEBUG -static volatile int prtrealloc = 0; +static int prtrealloc = 0; #endif int @@ -354,6 +356,9 @@ ffs_reallocblks(ap) struct cluster_save *a_buflist; } */ *ap; { +#if !defined (not_yes) + return (ENOSPC); +#else struct fs *fs; struct inode *ip; struct vnode *vp; @@ -363,6 +368,7 @@ ffs_reallocblks(ap) ufs_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; + struct timeval tv; if (doreallocblks == 0) return (ENOSPC); @@ -502,8 +508,10 @@ ffs_reallocblks(ap) bwrite(sbp); } else { ip->i_flag |= IN_CHANGE | IN_UPDATE; - if (!doasyncfree) - UFS_UPDATE(vp, 1); + if (!doasyncfree) { + gettime(&tv); + UFS_UPDATE(vp, &tv, &tv, 1); + } } if (ssize < len) if (doasyncfree) @@ -545,6 +553,7 @@ fail: if (sbap != &ip->i_db[0]) brelse(sbp); return (ENOSPC); +#endif } /* @@ -1078,6 +1087,7 @@ gotit: return (blkno); } +#ifdef notyet /* * Determine whether a cluster can be allocated. * @@ -1186,6 +1196,7 @@ fail: brelse(bp); return (0); } +#endif /* * Determine whether an inode can be allocated. |