Deleted Added
full compact
ffs_alloc.c (24149) ffs_alloc.c (27890)
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.32 1997/03/22 06:53:28 bde Exp $
34 * $Id: ffs_alloc.c,v 1.33 1997/03/23 20:08:16 guido 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>

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

1134 }
1135 if ((got & (NBBY - 1)) != (NBBY - 1)) {
1136 bit <<= 1;
1137 } else {
1138 map = *mapp++;
1139 bit = 1;
1140 }
1141 }
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>

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

1134 }
1135 if ((got & (NBBY - 1)) != (NBBY - 1)) {
1136 bit <<= 1;
1137 } else {
1138 map = *mapp++;
1139 bit = 1;
1140 }
1141 }
1142 if (got == cgp->cg_nclusterblks)
1142 if (got >= cgp->cg_nclusterblks)
1143 goto fail;
1144 /*
1145 * Allocate the cluster that we have found.
1146 */
1147 for (i = 1; i <= len; i++)
1148 if (!ffs_isblock(fs, cg_blksfree(cgp), got - run + i))
1149 panic("ffs_clusteralloc: map mismatch");
1150 bno = cg * fs->fs_fpg + blkstofrags(fs, got - run + 1);

--- 486 unchanged lines hidden ---
1143 goto fail;
1144 /*
1145 * Allocate the cluster that we have found.
1146 */
1147 for (i = 1; i <= len; i++)
1148 if (!ffs_isblock(fs, cg_blksfree(cgp), got - run + i))
1149 panic("ffs_clusteralloc: map mismatch");
1150 bno = cg * fs->fs_fpg + blkstofrags(fs, got - run + 1);

--- 486 unchanged lines hidden ---