Deleted Added
full compact
ffs_alloc.c (38408) ffs_alloc.c (38862)
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.50 1998/07/11 07:46:04 bde Exp $
34 * $Id: ffs_alloc.c,v 1.51 1998/08/17 19:09:36 bde 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>

--- 1252 unchanged lines hidden (view full) ---

1295{
1296 register struct fs *fs;
1297 register struct cg *cgp;
1298 struct buf *bp;
1299 ufs_daddr_t blkno;
1300 int i, error, cg, blk, frags, bbase;
1301
1302 fs = ip->i_fs;
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>

--- 1252 unchanged lines hidden (view full) ---

1295{
1296 register struct fs *fs;
1297 register struct cg *cgp;
1298 struct buf *bp;
1299 ufs_daddr_t blkno;
1300 int i, error, cg, blk, frags, bbase;
1301
1302 fs = ip->i_fs;
1303 VOP_FREEBLKS(ip->i_devvp, fsbtodb(fs, bno), size);
1303 if ((u_int)size > fs->fs_bsize || fragoff(fs, size) != 0 ||
1304 fragnum(fs, bno) + numfrags(fs, size) > fs->fs_frag) {
1305 printf("dev=0x%lx, bno = %d, bsize = %d, size = %ld, fs = %s\n",
1306 (u_long)ip->i_dev, bno, fs->fs_bsize, size, fs->fs_fsmnt);
1307 panic("ffs_blkfree: bad size");
1308 }
1309 cg = dtog(fs, bno);
1310 if ((u_int)bno >= fs->fs_size) {

--- 376 unchanged lines hidden ---
1304 if ((u_int)size > fs->fs_bsize || fragoff(fs, size) != 0 ||
1305 fragnum(fs, bno) + numfrags(fs, size) > fs->fs_frag) {
1306 printf("dev=0x%lx, bno = %d, bsize = %d, size = %ld, fs = %s\n",
1307 (u_long)ip->i_dev, bno, fs->fs_bsize, size, fs->fs_fsmnt);
1308 panic("ffs_blkfree: bad size");
1309 }
1310 cg = dtog(fs, bno);
1311 if ((u_int)bno >= fs->fs_size) {

--- 376 unchanged lines hidden ---