ffs_alloc.c (30492) | ffs_alloc.c (31016) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)ffs_alloc.c 8.18 (Berkeley) 5/26/95 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)ffs_alloc.c 8.18 (Berkeley) 5/26/95 |
34 * $Id: ffs_alloc.c,v 1.40 1997/10/16 10:49:19 phk Exp $ | 34 * $Id: ffs_alloc.c,v 1.41 1997/10/16 20:32:33 phk Exp $ |
35 */ 36 37#include "opt_quota.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/buf.h> 42#include <sys/proc.h> --- 12 unchanged lines hidden (view full) --- 55 56typedef ufs_daddr_t allocfcn_t __P((struct inode *ip, int cg, ufs_daddr_t bpref, 57 int size)); 58 59static ufs_daddr_t ffs_alloccg __P((struct inode *, int, ufs_daddr_t, int)); 60static ufs_daddr_t ffs_alloccgblk __P((struct fs *, struct cg *, ufs_daddr_t)); 61static void ffs_clusteracct __P((struct fs *, struct cg *, ufs_daddr_t, 62 int)); | 35 */ 36 37#include "opt_quota.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/buf.h> 42#include <sys/proc.h> --- 12 unchanged lines hidden (view full) --- 55 56typedef ufs_daddr_t allocfcn_t __P((struct inode *ip, int cg, ufs_daddr_t bpref, 57 int size)); 58 59static ufs_daddr_t ffs_alloccg __P((struct inode *, int, ufs_daddr_t, int)); 60static ufs_daddr_t ffs_alloccgblk __P((struct fs *, struct cg *, ufs_daddr_t)); 61static void ffs_clusteracct __P((struct fs *, struct cg *, ufs_daddr_t, 62 int)); |
63static ufs_daddr_t ffs_clusteralloc __P((struct inode *, int, ufs_daddr_t, 64 int)); | |
65static ino_t ffs_dirpref __P((struct fs *)); 66static ufs_daddr_t ffs_fragextend __P((struct inode *, int, long, int, int)); 67static void ffs_fserr __P((struct fs *, u_int, char *)); 68static u_long ffs_hashalloc 69 __P((struct inode *, int, long, int, allocfcn_t *)); 70static ino_t ffs_nodealloccg __P((struct inode *, int, ufs_daddr_t, int)); 71static ufs_daddr_t ffs_mapsearch __P((struct fs *, struct cg *, ufs_daddr_t, 72 int)); --- 257 unchanged lines hidden (view full) --- 330 * the previous block allocation will be used. 331 */ 332static int doasyncfree = 1; 333SYSCTL_INT(_vfs_ffs, FFS_ASYNCFREE, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, ""); 334 335int doreallocblks = 1; 336SYSCTL_INT(_vfs_ffs, FFS_REALLOCBLKS, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, ""); 337 | 63static ino_t ffs_dirpref __P((struct fs *)); 64static ufs_daddr_t ffs_fragextend __P((struct inode *, int, long, int, int)); 65static void ffs_fserr __P((struct fs *, u_int, char *)); 66static u_long ffs_hashalloc 67 __P((struct inode *, int, long, int, allocfcn_t *)); 68static ino_t ffs_nodealloccg __P((struct inode *, int, ufs_daddr_t, int)); 69static ufs_daddr_t ffs_mapsearch __P((struct fs *, struct cg *, ufs_daddr_t, 70 int)); --- 257 unchanged lines hidden (view full) --- 328 * the previous block allocation will be used. 329 */ 330static int doasyncfree = 1; 331SYSCTL_INT(_vfs_ffs, FFS_ASYNCFREE, doasyncfree, CTLFLAG_RW, &doasyncfree, 0, ""); 332 333int doreallocblks = 1; 334SYSCTL_INT(_vfs_ffs, FFS_REALLOCBLKS, doreallocblks, CTLFLAG_RW, &doreallocblks, 0, ""); 335 |
338static int prtrealloc = 0; 339 | |
340int 341ffs_reallocblks(ap) 342 struct vop_reallocblks_args /* { 343 struct vnode *a_vp; 344 struct cluster_save *a_buflist; 345 } */ *ap; 346{ 347#if !defined (not_yes) --- 1282 unchanged lines hidden --- | 336int 337ffs_reallocblks(ap) 338 struct vop_reallocblks_args /* { 339 struct vnode *a_vp; 340 struct cluster_save *a_buflist; 341 } */ *ap; 342{ 343#if !defined (not_yes) --- 1282 unchanged lines hidden --- |