Use ANSI function decls.
This commit is contained in:
parent
bf458186f4
commit
29af9583d2
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ffs_alloc.c,v 1.84 2005/06/06 17:10:25 dbj Exp $ */
|
||||
/* $NetBSD: ffs_alloc.c,v 1.85 2005/07/15 05:01:16 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Networks Associates Technology, Inc.
|
||||
@ -41,7 +41,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_alloc.c,v 1.84 2005/06/06 17:10:25 dbj Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_alloc.c,v 1.85 2005/07/15 05:01:16 thorpej Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_ffs.h"
|
||||
@ -67,22 +67,22 @@ __KERNEL_RCSID(0, "$NetBSD: ffs_alloc.c,v 1.84 2005/06/06 17:10:25 dbj Exp $");
|
||||
#include <ufs/ffs/fs.h>
|
||||
#include <ufs/ffs/ffs_extern.h>
|
||||
|
||||
static daddr_t ffs_alloccg __P((struct inode *, int, daddr_t, int));
|
||||
static daddr_t ffs_alloccgblk __P((struct inode *, struct buf *, daddr_t));
|
||||
static daddr_t ffs_alloccg(struct inode *, int, daddr_t, int);
|
||||
static daddr_t ffs_alloccgblk(struct inode *, struct buf *, daddr_t);
|
||||
#ifdef XXXUBC
|
||||
static daddr_t ffs_clusteralloc __P((struct inode *, int, daddr_t, int));
|
||||
static daddr_t ffs_clusteralloc(struct inode *, int, daddr_t, int);
|
||||
#endif
|
||||
static ino_t ffs_dirpref __P((struct inode *));
|
||||
static daddr_t ffs_fragextend __P((struct inode *, int, daddr_t, int, int));
|
||||
static void ffs_fserr __P((struct fs *, u_int, const char *));
|
||||
static daddr_t ffs_hashalloc __P((struct inode *, int, daddr_t, int,
|
||||
daddr_t (*)(struct inode *, int, daddr_t, int)));
|
||||
static daddr_t ffs_nodealloccg __P((struct inode *, int, daddr_t, int));
|
||||
static int32_t ffs_mapsearch __P((struct fs *, struct cg *,
|
||||
daddr_t, int));
|
||||
static ino_t ffs_dirpref(struct inode *);
|
||||
static daddr_t ffs_fragextend(struct inode *, int, daddr_t, int, int);
|
||||
static void ffs_fserr(struct fs *, u_int, const char *);
|
||||
static daddr_t ffs_hashalloc(struct inode *, int, daddr_t, int,
|
||||
daddr_t (*)(struct inode *, int, daddr_t, int));
|
||||
static daddr_t ffs_nodealloccg(struct inode *, int, daddr_t, int);
|
||||
static int32_t ffs_mapsearch(struct fs *, struct cg *,
|
||||
daddr_t, int);
|
||||
#if defined(DIAGNOSTIC) || defined(DEBUG)
|
||||
#ifdef XXXUBC
|
||||
static int ffs_checkblk __P((struct inode *, daddr_t, long size));
|
||||
static int ffs_checkblk(struct inode *, daddr_t, long size);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -113,12 +113,8 @@ extern const u_char * const fragtbl[];
|
||||
* available block is located.
|
||||
*/
|
||||
int
|
||||
ffs_alloc(ip, lbn, bpref, size, cred, bnp)
|
||||
struct inode *ip;
|
||||
daddr_t lbn, bpref;
|
||||
int size;
|
||||
struct ucred *cred;
|
||||
daddr_t *bnp;
|
||||
ffs_alloc(struct inode *ip, daddr_t lbn, daddr_t bpref, int size,
|
||||
struct ucred *cred, daddr_t *bnp)
|
||||
{
|
||||
struct fs *fs;
|
||||
daddr_t bno;
|
||||
@ -201,14 +197,8 @@ nospace:
|
||||
* invoked to get an appropriate block.
|
||||
*/
|
||||
int
|
||||
ffs_realloccg(ip, lbprev, bpref, osize, nsize, cred, bpp, blknop)
|
||||
struct inode *ip;
|
||||
daddr_t lbprev;
|
||||
daddr_t bpref;
|
||||
int osize, nsize;
|
||||
struct ucred *cred;
|
||||
struct buf **bpp;
|
||||
daddr_t *blknop;
|
||||
ffs_realloccg(struct inode *ip, daddr_t lbprev, daddr_t bpref, int osize,
|
||||
int nsize, struct ucred *cred, struct buf **bpp, daddr_t *blknop)
|
||||
{
|
||||
struct fs *fs;
|
||||
struct buf *bp;
|
||||
@ -424,8 +414,7 @@ struct ctldebug debug15 = { "prtrealloc", &prtrealloc };
|
||||
int doasyncfree = 1;
|
||||
|
||||
int
|
||||
ffs_reallocblks(v)
|
||||
void *v;
|
||||
ffs_reallocblks(void *v)
|
||||
{
|
||||
#ifdef XXXUBC
|
||||
struct vop_reallocblks_args /* {
|
||||
@ -651,8 +640,7 @@ fail:
|
||||
* available inode is located.
|
||||
*/
|
||||
int
|
||||
ffs_valloc(v)
|
||||
void *v;
|
||||
ffs_valloc(void *v)
|
||||
{
|
||||
struct vop_valloc_args /* {
|
||||
struct vnode *a_pvp;
|
||||
@ -760,8 +748,7 @@ noinodes:
|
||||
* in another cylinder group.
|
||||
*/
|
||||
static ino_t
|
||||
ffs_dirpref(pip)
|
||||
struct inode *pip;
|
||||
ffs_dirpref(struct inode *pip)
|
||||
{
|
||||
register struct fs *fs;
|
||||
int cg, prefcg;
|
||||
@ -881,11 +868,8 @@ ffs_dirpref(pip)
|
||||
* contigously if possible.
|
||||
*/
|
||||
daddr_t
|
||||
ffs_blkpref_ufs1(ip, lbn, indx, bap)
|
||||
struct inode *ip;
|
||||
daddr_t lbn;
|
||||
int indx;
|
||||
int32_t *bap; /* XXX ondisk32 */
|
||||
ffs_blkpref_ufs1(struct inode *ip, daddr_t lbn, int indx,
|
||||
int32_t *bap /* XXX ondisk32 */)
|
||||
{
|
||||
struct fs *fs;
|
||||
int cg;
|
||||
@ -926,11 +910,7 @@ ffs_blkpref_ufs1(ip, lbn, indx, bap)
|
||||
}
|
||||
|
||||
daddr_t
|
||||
ffs_blkpref_ufs2(ip, lbn, indx, bap)
|
||||
struct inode *ip;
|
||||
daddr_t lbn;
|
||||
int indx;
|
||||
int64_t *bap;
|
||||
ffs_blkpref_ufs2(struct inode *ip, daddr_t lbn, int indx, int64_t *bap)
|
||||
{
|
||||
struct fs *fs;
|
||||
int cg;
|
||||
@ -981,12 +961,9 @@ ffs_blkpref_ufs2(ip, lbn, indx, bap)
|
||||
*/
|
||||
/*VARARGS5*/
|
||||
static daddr_t
|
||||
ffs_hashalloc(ip, cg, pref, size, allocator)
|
||||
struct inode *ip;
|
||||
int cg;
|
||||
daddr_t pref;
|
||||
int size; /* size for data blocks, mode for inodes */
|
||||
daddr_t (*allocator) __P((struct inode *, int, daddr_t, int));
|
||||
ffs_hashalloc(struct inode *ip, int cg, daddr_t pref,
|
||||
int size /* size for data blocks, mode for inodes */,
|
||||
daddr_t (*allocator)(struct inode *, int, daddr_t, int))
|
||||
{
|
||||
struct fs *fs;
|
||||
daddr_t result;
|
||||
@ -1034,11 +1011,7 @@ ffs_hashalloc(ip, cg, pref, size, allocator)
|
||||
* if they are, allocate them.
|
||||
*/
|
||||
static daddr_t
|
||||
ffs_fragextend(ip, cg, bprev, osize, nsize)
|
||||
struct inode *ip;
|
||||
int cg;
|
||||
daddr_t bprev;
|
||||
int osize, nsize;
|
||||
ffs_fragextend(struct inode *ip, int cg, daddr_t bprev, int osize, int nsize)
|
||||
{
|
||||
struct fs *fs;
|
||||
struct cg *cgp;
|
||||
@ -1112,11 +1085,7 @@ ffs_fragextend(ip, cg, bprev, osize, nsize)
|
||||
* and if it is, allocate it.
|
||||
*/
|
||||
static daddr_t
|
||||
ffs_alloccg(ip, cg, bpref, size)
|
||||
struct inode *ip;
|
||||
int cg;
|
||||
daddr_t bpref;
|
||||
int size;
|
||||
ffs_alloccg(struct inode *ip, int cg, daddr_t bpref, int size)
|
||||
{
|
||||
struct fs *fs = ip->i_fs;
|
||||
struct cg *cgp;
|
||||
@ -1226,10 +1195,7 @@ ffs_alloccg(ip, cg, bpref, size)
|
||||
* blocks may be fragmented by the routine that allocates them.
|
||||
*/
|
||||
static daddr_t
|
||||
ffs_alloccgblk(ip, bp, bpref)
|
||||
struct inode *ip;
|
||||
struct buf *bp;
|
||||
daddr_t bpref;
|
||||
ffs_alloccgblk(struct inode *ip, struct buf *bp, daddr_t bpref)
|
||||
{
|
||||
struct fs *fs = ip->i_fs;
|
||||
struct cg *cgp;
|
||||
@ -1299,11 +1265,7 @@ gotit:
|
||||
* This function must be fixed for UFS2 if re-enabled.
|
||||
*/
|
||||
static daddr_t
|
||||
ffs_clusteralloc(ip, cg, bpref, len)
|
||||
struct inode *ip;
|
||||
int cg;
|
||||
daddr_t bpref;
|
||||
int len;
|
||||
ffs_clusteralloc(struct inode *ip, int cg, daddr_t bpref, int len)
|
||||
{
|
||||
struct fs *fs;
|
||||
struct cg *cgp;
|
||||
@ -1416,11 +1378,7 @@ fail:
|
||||
* inode in the specified cylinder group.
|
||||
*/
|
||||
static daddr_t
|
||||
ffs_nodealloccg(ip, cg, ipref, mode)
|
||||
struct inode *ip;
|
||||
int cg;
|
||||
daddr_t ipref;
|
||||
int mode;
|
||||
ffs_nodealloccg(struct inode *ip, int cg, daddr_t ipref, int mode)
|
||||
{
|
||||
struct fs *fs = ip->i_fs;
|
||||
struct cg *cgp;
|
||||
@ -1535,12 +1493,8 @@ gotit:
|
||||
* block reassembly is checked.
|
||||
*/
|
||||
void
|
||||
ffs_blkfree(fs, devvp, bno, size, inum)
|
||||
struct fs *fs;
|
||||
struct vnode *devvp;
|
||||
daddr_t bno;
|
||||
long size;
|
||||
ino_t inum;
|
||||
ffs_blkfree(struct fs *fs, struct vnode *devvp, daddr_t bno, long size,
|
||||
ino_t inum)
|
||||
{
|
||||
struct cg *cgp;
|
||||
struct buf *bp;
|
||||
@ -1687,10 +1641,7 @@ ffs_blkfree(fs, devvp, bno, size, inum)
|
||||
* fragment is allocated, false if it is free.
|
||||
*/
|
||||
static int
|
||||
ffs_checkblk(ip, bno, size)
|
||||
struct inode *ip;
|
||||
daddr_t bno;
|
||||
long size;
|
||||
ffs_checkblk(struct inode *ip, daddr_t bno, long size)
|
||||
{
|
||||
struct fs *fs;
|
||||
struct cg *cgp;
|
||||
@ -1738,8 +1689,7 @@ ffs_checkblk(ip, bno, size)
|
||||
* Free an inode.
|
||||
*/
|
||||
int
|
||||
ffs_vfree(v)
|
||||
void *v;
|
||||
ffs_vfree(void *v)
|
||||
{
|
||||
struct vop_vfree_args /* {
|
||||
struct vnode *a_pvp;
|
||||
@ -1760,11 +1710,7 @@ ffs_vfree(v)
|
||||
* The specified inode is placed back in the free map.
|
||||
*/
|
||||
int
|
||||
ffs_freefile(fs, devvp, ino, mode)
|
||||
struct fs *fs;
|
||||
struct vnode *devvp;
|
||||
ino_t ino;
|
||||
int mode;
|
||||
ffs_freefile(struct fs *fs, struct vnode *devvp, ino_t ino, int mode)
|
||||
{
|
||||
struct cg *cgp;
|
||||
struct buf *bp;
|
||||
@ -1831,10 +1777,7 @@ ffs_freefile(fs, devvp, ino, mode)
|
||||
* Check to see if a file is free.
|
||||
*/
|
||||
int
|
||||
ffs_checkfreefile(fs, devvp, ino)
|
||||
struct fs *fs;
|
||||
struct vnode *devvp;
|
||||
ino_t ino;
|
||||
ffs_checkfreefile(struct fs *fs, struct vnode *devvp, ino_t ino)
|
||||
{
|
||||
struct cg *cgp;
|
||||
struct buf *bp;
|
||||
@ -1873,11 +1816,7 @@ ffs_checkfreefile(fs, devvp, ino)
|
||||
* available.
|
||||
*/
|
||||
static int32_t
|
||||
ffs_mapsearch(fs, cgp, bpref, allocsiz)
|
||||
struct fs *fs;
|
||||
struct cg *cgp;
|
||||
daddr_t bpref;
|
||||
int allocsiz;
|
||||
ffs_mapsearch(struct fs *fs, struct cg *cgp, daddr_t bpref, int allocsiz)
|
||||
{
|
||||
int32_t bno;
|
||||
int start, len, loc, i;
|
||||
@ -1951,11 +1890,7 @@ ffs_mapsearch(fs, cgp, bpref, allocsiz)
|
||||
* Cnt == 1 means free; cnt == -1 means allocating.
|
||||
*/
|
||||
void
|
||||
ffs_clusteracct(fs, cgp, blkno, cnt)
|
||||
struct fs *fs;
|
||||
struct cg *cgp;
|
||||
int32_t blkno;
|
||||
int cnt;
|
||||
ffs_clusteracct(struct fs *fs, struct cg *cgp, int32_t blkno, int cnt)
|
||||
{
|
||||
int32_t *sump;
|
||||
int32_t *lp;
|
||||
@ -2048,10 +1983,7 @@ ffs_clusteracct(fs, cgp, blkno, cnt)
|
||||
* fs: error message
|
||||
*/
|
||||
static void
|
||||
ffs_fserr(fs, uid, cp)
|
||||
struct fs *fs;
|
||||
u_int uid;
|
||||
const char *cp;
|
||||
ffs_fserr(struct fs *fs, u_int uid, const char *cp)
|
||||
{
|
||||
|
||||
log(LOG_ERR, "uid %d, pid %d, command %s, on %s: %s\n",
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ffs_appleufs.c,v 1.6 2005/02/26 22:32:20 perry Exp $ */
|
||||
/* $NetBSD: ffs_appleufs.c,v 1.7 2005/07/15 05:01:16 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Darrin B. Jewell
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_appleufs.c,v 1.6 2005/02/26 22:32:20 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_appleufs.c,v 1.7 2005/07/15 05:01:16 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
@ -59,8 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: ffs_appleufs.c,v 1.6 2005/02/26 22:32:20 perry Exp $
|
||||
* this is the same calculation as in_cksum
|
||||
*/
|
||||
u_int16_t
|
||||
ffs_appleufs_cksum(appleufs)
|
||||
const struct appleufslabel *appleufs;
|
||||
ffs_appleufs_cksum(const struct appleufslabel *appleufs)
|
||||
{
|
||||
const u_int16_t *p = (const u_int16_t *)appleufs;
|
||||
int len = APPLEUFS_LABEL_SIZE; /* sizeof(struct appleufslabel) */
|
||||
@ -82,10 +81,8 @@ ffs_appleufs_cksum(appleufs)
|
||||
* returns 0 if ok, EINVAL if not valid
|
||||
*/
|
||||
int
|
||||
ffs_appleufs_validate(name,o,n)
|
||||
const char *name;
|
||||
const struct appleufslabel *o;
|
||||
struct appleufslabel *n;
|
||||
ffs_appleufs_validate(const char *name, const struct appleufslabel *o,
|
||||
struct appleufslabel *n)
|
||||
{
|
||||
struct appleufslabel tmp;
|
||||
if (!n) n = &tmp;
|
||||
@ -128,11 +125,8 @@ ffs_appleufs_validate(name,o,n)
|
||||
}
|
||||
|
||||
void
|
||||
ffs_appleufs_set(appleufs, name, t, uuid)
|
||||
struct appleufslabel *appleufs;
|
||||
const char *name;
|
||||
time_t t;
|
||||
uint64_t uuid;
|
||||
ffs_appleufs_set(struct appleufslabel *appleufs, const char *name, time_t t,
|
||||
uint64_t uuid)
|
||||
{
|
||||
size_t namelen;
|
||||
if (!name) name = "untitled";
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ffs_balloc.c,v 1.37 2004/12/15 07:11:51 mycroft Exp $ */
|
||||
/* $NetBSD: ffs_balloc.c,v 1.38 2005/07/15 05:01:16 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Networks Associates Technology, Inc.
|
||||
@ -41,7 +41,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_balloc.c,v 1.37 2004/12/15 07:11:51 mycroft Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_balloc.c,v 1.38 2005/07/15 05:01:16 thorpej Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_quota.h"
|
||||
@ -76,8 +76,7 @@ static int ffs_balloc_ufs2(void *);
|
||||
*/
|
||||
|
||||
int
|
||||
ffs_balloc(v)
|
||||
void *v;
|
||||
ffs_balloc(void *v)
|
||||
{
|
||||
struct vop_balloc_args *ap = v;
|
||||
|
||||
@ -88,8 +87,7 @@ ffs_balloc(v)
|
||||
}
|
||||
|
||||
static int
|
||||
ffs_balloc_ufs1(v)
|
||||
void *v;
|
||||
ffs_balloc_ufs1(void *v)
|
||||
{
|
||||
struct vop_balloc_args /* {
|
||||
struct vnode *a_vp;
|
||||
@ -539,8 +537,7 @@ fail:
|
||||
}
|
||||
|
||||
static int
|
||||
ffs_balloc_ufs2(v)
|
||||
void *v;
|
||||
ffs_balloc_ufs2(void *v)
|
||||
{
|
||||
struct vop_balloc_args /* {
|
||||
struct vnode *a_vp;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ffs_extern.h,v 1.42 2005/02/26 22:32:20 perry Exp $ */
|
||||
/* $NetBSD: ffs_extern.h,v 1.43 2005/07/15 05:01:16 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993, 1994
|
||||
@ -79,80 +79,82 @@ extern struct pool ffs_dinode2_pool; /* memory pool for UFS2 dinodes */
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* ffs_alloc.c */
|
||||
int ffs_alloc __P((struct inode *, daddr_t, daddr_t , int, struct ucred *,
|
||||
daddr_t *));
|
||||
int ffs_realloccg __P((struct inode *, daddr_t, daddr_t, int, int ,
|
||||
struct ucred *, struct buf **, daddr_t *));
|
||||
int ffs_reallocblks __P((void *));
|
||||
int ffs_valloc __P((void *));
|
||||
daddr_t ffs_blkpref_ufs1 __P((struct inode *, daddr_t, int, int32_t *));
|
||||
daddr_t ffs_blkpref_ufs2 __P((struct inode *, daddr_t, int, int64_t *));
|
||||
void ffs_blkfree __P((struct fs *, struct vnode *, daddr_t, long, ino_t));
|
||||
int ffs_vfree __P((void *));
|
||||
void ffs_clusteracct __P((struct fs *, struct cg *, int32_t, int));
|
||||
int ffs_checkfreefile __P((struct fs *, struct vnode *, ino_t));
|
||||
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_valloc(void *);
|
||||
daddr_t ffs_blkpref_ufs1(struct inode *, daddr_t, int, int32_t *);
|
||||
daddr_t ffs_blkpref_ufs2(struct inode *, daddr_t, int, int64_t *);
|
||||
void ffs_blkfree(struct fs *, struct vnode *, daddr_t, long, ino_t);
|
||||
int ffs_vfree(void *);
|
||||
void ffs_clusteracct(struct fs *, struct cg *, int32_t, int);
|
||||
int ffs_checkfreefile(struct fs *, struct vnode *, ino_t);
|
||||
|
||||
/* ffs_balloc.c */
|
||||
int ffs_balloc __P((void *));
|
||||
int ffs_balloc(void *);
|
||||
|
||||
/* ffs_bswap.c */
|
||||
void ffs_sb_swap __P((struct fs*, struct fs *));
|
||||
void ffs_dinode1_swap __P((struct ufs1_dinode *, struct ufs1_dinode *));
|
||||
void ffs_dinode2_swap __P((struct ufs2_dinode *, struct ufs2_dinode *));
|
||||
void ffs_csum_swap __P((struct csum *, struct csum *, int));
|
||||
void ffs_csumtotal_swap __P((struct csum_total *, struct csum_total *));
|
||||
void ffs_cg_swap __P((struct cg *, struct cg *, struct fs *));
|
||||
void ffs_sb_swap(struct fs*, struct fs *);
|
||||
void ffs_dinode1_swap(struct ufs1_dinode *, struct ufs1_dinode *);
|
||||
void ffs_dinode2_swap(struct ufs2_dinode *, struct ufs2_dinode *);
|
||||
void ffs_csum_swap(struct csum *, struct csum *, int);
|
||||
void ffs_csumtotal_swap(struct csum_total *, struct csum_total *);
|
||||
void ffs_cg_swap(struct cg *, struct cg *, struct fs *);
|
||||
|
||||
/* ffs_inode.c */
|
||||
int ffs_update __P((void *));
|
||||
int ffs_truncate __P((void *));
|
||||
int ffs_update(void *);
|
||||
int ffs_truncate(void *);
|
||||
|
||||
/* ffs_subr.c */
|
||||
void ffs_load_inode __P((struct buf *, struct inode *, struct fs *, ino_t));
|
||||
int ffs_blkatoff __P((void *));
|
||||
int ffs_freefile __P((struct fs *, struct vnode *, ino_t, int));
|
||||
void ffs_fragacct __P((struct fs *, int, int32_t[], int, int));
|
||||
void ffs_load_inode(struct buf *, struct inode *, struct fs *, ino_t);
|
||||
int ffs_blkatoff(void *);
|
||||
int ffs_freefile(struct fs *, struct vnode *, ino_t, int);
|
||||
void ffs_fragacct(struct fs *, int, int32_t[], int, int);
|
||||
#ifdef DIAGNOSTIC
|
||||
void ffs_checkoverlap __P((struct buf *, struct inode *));
|
||||
void ffs_checkoverlap(struct buf *, struct inode *);
|
||||
#endif
|
||||
int ffs_isblock __P((struct fs *, u_char *, int32_t));
|
||||
int ffs_isfreeblock __P((struct fs *, u_char *, int32_t));
|
||||
void ffs_clrblock __P((struct fs *, u_char *, int32_t));
|
||||
void ffs_setblock __P((struct fs *, u_char *, int32_t));
|
||||
int ffs_isblock(struct fs *, u_char *, int32_t);
|
||||
int ffs_isfreeblock(struct fs *, u_char *, int32_t);
|
||||
void ffs_clrblock(struct fs *, u_char *, int32_t);
|
||||
void ffs_setblock(struct fs *, u_char *, int32_t);
|
||||
|
||||
/* ffs_vfsops.c */
|
||||
void ffs_init __P((void));
|
||||
void ffs_reinit __P((void));
|
||||
void ffs_done __P((void));
|
||||
int ffs_mountroot __P((void));
|
||||
int ffs_mount __P((struct mount *, const char *, void *, struct nameidata *,
|
||||
struct proc *));
|
||||
int ffs_reload __P((struct mount *, struct ucred *, struct proc *));
|
||||
int ffs_mountfs __P((struct vnode *, struct mount *, struct proc *));
|
||||
int ffs_unmount __P((struct mount *, int, struct proc *));
|
||||
int ffs_flushfiles __P((struct mount *, int, struct proc *));
|
||||
int ffs_statvfs __P((struct mount *, struct statvfs *, struct proc *));
|
||||
int ffs_sync __P((struct mount *, int, struct ucred *, struct proc *));
|
||||
int ffs_vget __P((struct mount *, ino_t, struct vnode **));
|
||||
int ffs_fhtovp __P((struct mount *, struct fid *, struct vnode **));
|
||||
int ffs_vptofh __P((struct vnode *, struct fid *));
|
||||
int ffs_sbupdate __P((struct ufsmount *, int));
|
||||
int ffs_cgupdate __P((struct ufsmount *, int));
|
||||
void ffs_init(void);
|
||||
void ffs_reinit(void);
|
||||
void ffs_done(void);
|
||||
int ffs_mountroot(void);
|
||||
int ffs_mount(struct mount *, const char *, void *, struct nameidata *,
|
||||
struct proc *);
|
||||
int ffs_reload(struct mount *, struct ucred *, struct proc *);
|
||||
int ffs_mountfs(struct vnode *, struct mount *, struct proc *);
|
||||
int ffs_unmount(struct mount *, int, struct proc *);
|
||||
int ffs_flushfiles(struct mount *, int, struct proc *);
|
||||
int ffs_statvfs(struct mount *, struct statvfs *, struct proc *);
|
||||
int ffs_sync(struct mount *, int, struct ucred *, struct proc *);
|
||||
int ffs_vget(struct mount *, ino_t, struct vnode **);
|
||||
int ffs_fhtovp(struct mount *, struct fid *, struct vnode **);
|
||||
int ffs_vptofh(struct vnode *, struct fid *);
|
||||
int ffs_sbupdate(struct ufsmount *, int);
|
||||
int ffs_cgupdate(struct ufsmount *, int);
|
||||
|
||||
/* ffs_appleufs.c */
|
||||
u_int16_t ffs_appleufs_cksum __P((const struct appleufslabel *));
|
||||
int ffs_appleufs_validate __P((const char*,const struct appleufslabel *,struct appleufslabel *));
|
||||
void ffs_appleufs_set __P((struct appleufslabel *, const char *, time_t, uint64_t));
|
||||
u_int16_t ffs_appleufs_cksum(const struct appleufslabel *);
|
||||
int ffs_appleufs_validate(const char*, const struct appleufslabel *,
|
||||
struct appleufslabel *);
|
||||
void ffs_appleufs_set(struct appleufslabel *, const char *, time_t,
|
||||
uint64_t);
|
||||
|
||||
|
||||
/* ffs_vnops.c */
|
||||
int ffs_read __P((void *));
|
||||
int ffs_write __P((void *));
|
||||
int ffs_fsync __P((void *));
|
||||
int ffs_reclaim __P((void *));
|
||||
int ffs_getpages __P((void *));
|
||||
int ffs_putpages __P((void *));
|
||||
void ffs_gop_size __P((struct vnode *, off_t, off_t *, int));
|
||||
int ffs_read(void *);
|
||||
int ffs_write(void *);
|
||||
int ffs_fsync(void *);
|
||||
int ffs_reclaim(void *);
|
||||
int ffs_getpages(void *);
|
||||
int ffs_putpages(void *);
|
||||
void ffs_gop_size(struct vnode *, off_t, off_t *, int);
|
||||
|
||||
#ifdef SYSCTL_SETUP_PROTO
|
||||
SYSCTL_SETUP_PROTO(sysctl_vfs_ffs_setup);
|
||||
@ -174,29 +176,30 @@ void ffs_snapgone(struct inode *);
|
||||
/*
|
||||
* Soft dependency function prototypes.
|
||||
*/
|
||||
void softdep_initialize __P((void));
|
||||
void softdep_reinitialize __P((void));
|
||||
int softdep_mount __P((struct vnode *, struct mount *, struct fs *,
|
||||
struct ucred *));
|
||||
int softdep_flushworklist __P((struct mount *, int *, struct proc *));
|
||||
int softdep_flushfiles __P((struct mount *, int, struct proc *));
|
||||
void softdep_update_inodeblock __P((struct inode *, struct buf *, int));
|
||||
void softdep_load_inodeblock __P((struct inode *));
|
||||
void softdep_freefile __P((void *));
|
||||
void softdep_setup_freeblocks __P((struct inode *, off_t, int));
|
||||
void softdep_setup_inomapdep __P((struct buf *, struct inode *, ino_t));
|
||||
void softdep_setup_blkmapdep __P((struct buf *, struct fs *, daddr_t));
|
||||
void softdep_setup_allocdirect __P((struct inode *, daddr_t, daddr_t,
|
||||
daddr_t, long, long, struct buf *));
|
||||
void softdep_setup_allocindir_meta __P((struct buf *, struct inode *,
|
||||
struct buf *, int, daddr_t));
|
||||
void softdep_setup_allocindir_page __P((struct inode *, daddr_t,
|
||||
struct buf *, int, daddr_t, daddr_t, struct buf *));
|
||||
void softdep_fsync_mountdev __P((struct vnode *));
|
||||
int softdep_sync_metadata __P((void *));
|
||||
void softdep_initialize(void);
|
||||
void softdep_reinitialize(void);
|
||||
int softdep_mount(struct vnode *, struct mount *, struct fs *,
|
||||
struct ucred *);
|
||||
int softdep_flushworklist(struct mount *, int *, struct proc *);
|
||||
int softdep_flushfiles(struct mount *, int, struct proc *);
|
||||
void softdep_update_inodeblock(struct inode *, struct buf *, int);
|
||||
void softdep_load_inodeblock(struct inode *);
|
||||
void softdep_freefile(void *);
|
||||
void softdep_setup_freeblocks(struct inode *, off_t, int);
|
||||
void softdep_setup_inomapdep(struct buf *, struct inode *, ino_t);
|
||||
void softdep_setup_blkmapdep(struct buf *, struct fs *, daddr_t);
|
||||
void softdep_setup_allocdirect(struct inode *, daddr_t, daddr_t,
|
||||
daddr_t, long, long, struct buf *);
|
||||
void softdep_setup_allocindir_meta(struct buf *, struct inode *,
|
||||
struct buf *, int, daddr_t);
|
||||
void softdep_setup_allocindir_page(struct inode *, daddr_t,
|
||||
struct buf *, int, daddr_t, daddr_t,
|
||||
struct buf *);
|
||||
void softdep_fsync_mountdev(struct vnode *);
|
||||
int softdep_sync_metadata(void *);
|
||||
|
||||
extern int (**ffs_vnodeop_p) __P((void *));
|
||||
extern int (**ffs_specop_p) __P((void *));
|
||||
extern int (**ffs_fifoop_p) __P((void *));
|
||||
extern int (**ffs_vnodeop_p)(void *);
|
||||
extern int (**ffs_specop_p)(void *);
|
||||
extern int (**ffs_fifoop_p)(void *);
|
||||
|
||||
#endif /* !_UFS_FFS_FFS_EXTERN_H_ */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ffs_inode.c,v 1.71 2004/08/15 19:01:16 mycroft Exp $ */
|
||||
/* $NetBSD: ffs_inode.c,v 1.72 2005/07/15 05:01:16 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_inode.c,v 1.71 2004/08/15 19:01:16 mycroft Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_inode.c,v 1.72 2005/07/15 05:01:16 thorpej Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_ffs.h"
|
||||
@ -60,8 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: ffs_inode.c,v 1.71 2004/08/15 19:01:16 mycroft Exp $
|
||||
#include <ufs/ffs/fs.h>
|
||||
#include <ufs/ffs/ffs_extern.h>
|
||||
|
||||
static int ffs_indirtrunc __P((struct inode *, daddr_t, daddr_t,
|
||||
daddr_t, int, int64_t *));
|
||||
static int ffs_indirtrunc(struct inode *, daddr_t, daddr_t, daddr_t, int,
|
||||
int64_t *);
|
||||
|
||||
/*
|
||||
* Update the access, modified, and inode change times as specified
|
||||
@ -75,8 +75,7 @@ static int ffs_indirtrunc __P((struct inode *, daddr_t, daddr_t,
|
||||
*/
|
||||
|
||||
int
|
||||
ffs_update(v)
|
||||
void *v;
|
||||
ffs_update(void *v)
|
||||
{
|
||||
struct vop_update_args /* {
|
||||
struct vnode *a_vp;
|
||||
@ -173,8 +172,7 @@ ffs_update(v)
|
||||
* disk blocks.
|
||||
*/
|
||||
int
|
||||
ffs_truncate(v)
|
||||
void *v;
|
||||
ffs_truncate(void *v)
|
||||
{
|
||||
struct vop_truncate_args /* {
|
||||
struct vnode *a_vp;
|
||||
@ -522,12 +520,8 @@ done:
|
||||
* NB: triple indirect blocks are untested.
|
||||
*/
|
||||
static int
|
||||
ffs_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
|
||||
struct inode *ip;
|
||||
daddr_t lbn, lastbn;
|
||||
daddr_t dbn;
|
||||
int level;
|
||||
int64_t *countp;
|
||||
ffs_indirtrunc(struct inode *ip, daddr_t lbn, daddr_t dbn, daddr_t lastbn,
|
||||
int level, int64_t *countp)
|
||||
{
|
||||
int i;
|
||||
struct buf *bp;
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: ffs_snapshot.c,v 1.18 2005/07/15 05:01:16 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
|
||||
*
|
||||
@ -36,7 +38,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.17 2005/05/29 21:25:24 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.18 2005/07/15 05:01:16 thorpej Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_ffs.h"
|
||||
@ -129,10 +131,7 @@ static int snapdebug = 0;
|
||||
* Vnode is locked on entry and return.
|
||||
*/
|
||||
int
|
||||
ffs_snapshot(mp, vp, ctime)
|
||||
struct mount *mp;
|
||||
struct vnode *vp;
|
||||
struct timespec *ctime;
|
||||
ffs_snapshot(struct mount *mp, struct vnode *vp, struct timespec *ctime)
|
||||
{
|
||||
#if defined(FFS_NO_SNAPSHOT)
|
||||
return EOPNOTSUPP;
|
||||
@ -693,11 +692,7 @@ out:
|
||||
* replacement pass is done.
|
||||
*/
|
||||
static int
|
||||
cgaccount(cg, vp, data, passno)
|
||||
int cg;
|
||||
struct vnode *vp;
|
||||
caddr_t data;
|
||||
int passno;
|
||||
cgaccount(int cg, struct vnode *vp, caddr_t data, int passno)
|
||||
{
|
||||
struct buf *bp, *ibp;
|
||||
struct inode *ip;
|
||||
@ -780,13 +775,10 @@ cgaccount(cg, vp, data, passno)
|
||||
* is reproduced once each for UFS1 and UFS2.
|
||||
*/
|
||||
static int
|
||||
expunge_ufs1(snapvp, cancelip, fs, acctfunc, expungetype)
|
||||
struct vnode *snapvp;
|
||||
struct inode *cancelip;
|
||||
struct fs *fs;
|
||||
int (*acctfunc)(struct vnode *, ufs1_daddr_t *, ufs1_daddr_t *,
|
||||
struct fs *, ufs_lbn_t, int);
|
||||
int expungetype;
|
||||
expunge_ufs1(struct vnode *snapvp, struct inode *cancelip, struct fs *fs,
|
||||
int (*acctfunc)(struct vnode *, ufs1_daddr_t *, ufs1_daddr_t *,
|
||||
struct fs *, ufs_lbn_t, int),
|
||||
int expungetype)
|
||||
{
|
||||
int i, s, error, ns, indiroff;
|
||||
ufs_lbn_t lbn, rlbn;
|
||||
@ -874,20 +866,12 @@ expunge_ufs1(snapvp, cancelip, fs, acctfunc, expungetype)
|
||||
* its indirect blocks in snapvp.
|
||||
*/
|
||||
static int
|
||||
indiracct_ufs1(snapvp, cancelvp, level, blkno, lbn, rlbn, remblks,
|
||||
blksperindir, fs, acctfunc, expungetype)
|
||||
struct vnode *snapvp;
|
||||
struct vnode *cancelvp;
|
||||
int level;
|
||||
ufs1_daddr_t blkno;
|
||||
ufs_lbn_t lbn;
|
||||
ufs_lbn_t rlbn;
|
||||
ufs_lbn_t remblks;
|
||||
ufs_lbn_t blksperindir;
|
||||
struct fs *fs;
|
||||
int (*acctfunc)(struct vnode *, ufs1_daddr_t *, ufs1_daddr_t *,
|
||||
struct fs *, ufs_lbn_t, int);
|
||||
int expungetype;
|
||||
indiracct_ufs1(struct vnode *snapvp, struct vnode *cancelvp, int level,
|
||||
ufs1_daddr_t blkno, ufs_lbn_t lbn, ufs_lbn_t rlbn, ufs_lbn_t remblks,
|
||||
ufs_lbn_t blksperindir, struct fs *fs,
|
||||
int (*acctfunc)(struct vnode *, ufs1_daddr_t *, ufs1_daddr_t *,
|
||||
struct fs *, ufs_lbn_t, int),
|
||||
int expungetype)
|
||||
{
|
||||
int error, ns, num, i;
|
||||
ufs_lbn_t subblksperindir;
|
||||
@ -954,12 +938,9 @@ out:
|
||||
* Do both snap accounting and map accounting.
|
||||
*/
|
||||
static int
|
||||
fullacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, exptype)
|
||||
struct vnode *vp;
|
||||
ufs1_daddr_t *oldblkp, *lastblkp;
|
||||
struct fs *fs;
|
||||
ufs_lbn_t lblkno;
|
||||
int exptype; /* BLK_SNAP or BLK_NOCOPY */
|
||||
fullacct_ufs1(struct vnode *vp, ufs1_daddr_t *oldblkp, ufs1_daddr_t *lastblkp,
|
||||
struct fs *fs, ufs_lbn_t lblkno,
|
||||
int exptype /* BLK_SNAP or BLK_NOCOPY */)
|
||||
{
|
||||
int error;
|
||||
|
||||
@ -972,12 +953,9 @@ fullacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, exptype)
|
||||
* Identify a set of blocks allocated in a snapshot inode.
|
||||
*/
|
||||
static int
|
||||
snapacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, expungetype)
|
||||
struct vnode *vp;
|
||||
ufs1_daddr_t *oldblkp, *lastblkp;
|
||||
struct fs *fs;
|
||||
ufs_lbn_t lblkno;
|
||||
int expungetype; /* BLK_SNAP or BLK_NOCOPY */
|
||||
snapacct_ufs1(struct vnode *vp, ufs1_daddr_t *oldblkp, ufs1_daddr_t *lastblkp,
|
||||
struct fs *fs, ufs_lbn_t lblkno,
|
||||
int expungetype /* BLK_SNAP or BLK_NOCOPY */)
|
||||
{
|
||||
struct inode *ip = VTOI(vp);
|
||||
ufs1_daddr_t blkno, *blkp;
|
||||
@ -1028,12 +1006,8 @@ snapacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, expungetype)
|
||||
* Account for a set of blocks allocated in a snapshot inode.
|
||||
*/
|
||||
static int
|
||||
mapacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, expungetype)
|
||||
struct vnode *vp;
|
||||
ufs1_daddr_t *oldblkp, *lastblkp;
|
||||
struct fs *fs;
|
||||
ufs_lbn_t lblkno;
|
||||
int expungetype;
|
||||
mapacct_ufs1(struct vnode *vp, ufs1_daddr_t *oldblkp, ufs1_daddr_t *lastblkp,
|
||||
struct fs *fs, ufs_lbn_t lblkno, int expungetype)
|
||||
{
|
||||
ufs1_daddr_t blkno;
|
||||
struct inode *ip;
|
||||
@ -1069,13 +1043,10 @@ mapacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, expungetype)
|
||||
* is reproduced once each for UFS1 and UFS2.
|
||||
*/
|
||||
static int
|
||||
expunge_ufs2(snapvp, cancelip, fs, acctfunc, expungetype)
|
||||
struct vnode *snapvp;
|
||||
struct inode *cancelip;
|
||||
struct fs *fs;
|
||||
int (*acctfunc)(struct vnode *, ufs2_daddr_t *, ufs2_daddr_t *,
|
||||
struct fs *, ufs_lbn_t, int);
|
||||
int expungetype;
|
||||
expunge_ufs2(struct vnode *snapvp, struct inode *cancelip, struct fs *fs,
|
||||
int (*acctfunc)(struct vnode *, ufs2_daddr_t *, ufs2_daddr_t *,
|
||||
struct fs *, ufs_lbn_t, int),
|
||||
int expungetype)
|
||||
{
|
||||
int i, s, error, ns, indiroff;
|
||||
ufs_lbn_t lbn, rlbn;
|
||||
@ -1163,20 +1134,12 @@ expunge_ufs2(snapvp, cancelip, fs, acctfunc, expungetype)
|
||||
* its indirect blocks in snapvp.
|
||||
*/
|
||||
static int
|
||||
indiracct_ufs2(snapvp, cancelvp, level, blkno, lbn, rlbn, remblks,
|
||||
blksperindir, fs, acctfunc, expungetype)
|
||||
struct vnode *snapvp;
|
||||
struct vnode *cancelvp;
|
||||
int level;
|
||||
ufs2_daddr_t blkno;
|
||||
ufs_lbn_t lbn;
|
||||
ufs_lbn_t rlbn;
|
||||
ufs_lbn_t remblks;
|
||||
ufs_lbn_t blksperindir;
|
||||
struct fs *fs;
|
||||
int (*acctfunc)(struct vnode *, ufs2_daddr_t *, ufs2_daddr_t *,
|
||||
struct fs *, ufs_lbn_t, int);
|
||||
int expungetype;
|
||||
indiracct_ufs2(struct vnode *snapvp, struct vnode *cancelvp, int level,
|
||||
ufs2_daddr_t blkno, ufs_lbn_t lbn, ufs_lbn_t rlbn, ufs_lbn_t remblks,
|
||||
ufs_lbn_t blksperindir, struct fs *fs,
|
||||
int (*acctfunc)(struct vnode *, ufs2_daddr_t *, ufs2_daddr_t *,
|
||||
struct fs *, ufs_lbn_t, int),
|
||||
int expungetype)
|
||||
{
|
||||
int error, ns, num, i;
|
||||
ufs_lbn_t subblksperindir;
|
||||
@ -1243,12 +1206,9 @@ out:
|
||||
* Do both snap accounting and map accounting.
|
||||
*/
|
||||
static int
|
||||
fullacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, exptype)
|
||||
struct vnode *vp;
|
||||
ufs2_daddr_t *oldblkp, *lastblkp;
|
||||
struct fs *fs;
|
||||
ufs_lbn_t lblkno;
|
||||
int exptype; /* BLK_SNAP or BLK_NOCOPY */
|
||||
fullacct_ufs2(struct vnode *vp, ufs2_daddr_t *oldblkp, ufs2_daddr_t *lastblkp,
|
||||
struct fs *fs, ufs_lbn_t lblkno,
|
||||
int exptype /* BLK_SNAP or BLK_NOCOPY */)
|
||||
{
|
||||
int error;
|
||||
|
||||
@ -1261,12 +1221,9 @@ fullacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, exptype)
|
||||
* Identify a set of blocks allocated in a snapshot inode.
|
||||
*/
|
||||
static int
|
||||
snapacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, expungetype)
|
||||
struct vnode *vp;
|
||||
ufs2_daddr_t *oldblkp, *lastblkp;
|
||||
struct fs *fs;
|
||||
ufs_lbn_t lblkno;
|
||||
int expungetype; /* BLK_SNAP or BLK_NOCOPY */
|
||||
snapacct_ufs2(struct vnode *vp, ufs2_daddr_t *oldblkp, ufs2_daddr_t *lastblkp,
|
||||
struct fs *fs, ufs_lbn_t lblkno,
|
||||
int expungetype /* BLK_SNAP or BLK_NOCOPY */)
|
||||
{
|
||||
struct inode *ip = VTOI(vp);
|
||||
ufs2_daddr_t blkno, *blkp;
|
||||
@ -1317,12 +1274,8 @@ snapacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, expungetype)
|
||||
* Account for a set of blocks allocated in a snapshot inode.
|
||||
*/
|
||||
static int
|
||||
mapacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, expungetype)
|
||||
struct vnode *vp;
|
||||
ufs2_daddr_t *oldblkp, *lastblkp;
|
||||
struct fs *fs;
|
||||
ufs_lbn_t lblkno;
|
||||
int expungetype;
|
||||
mapacct_ufs2(struct vnode *vp, ufs2_daddr_t *oldblkp, ufs2_daddr_t *lastblkp,
|
||||
struct fs *fs, ufs_lbn_t lblkno, int expungetype)
|
||||
{
|
||||
ufs2_daddr_t blkno;
|
||||
struct inode *ip;
|
||||
@ -1355,8 +1308,7 @@ mapacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, expungetype)
|
||||
* It will not be freed until the last open reference goes away.
|
||||
*/
|
||||
void
|
||||
ffs_snapgone(ip)
|
||||
struct inode *ip;
|
||||
ffs_snapgone(struct inode *ip)
|
||||
{
|
||||
struct ufsmount *ump = VFSTOUFS(ip->i_devvp->v_specmountpoint);
|
||||
struct inode *xp;
|
||||
@ -1397,8 +1349,7 @@ ffs_snapgone(ip)
|
||||
* Prepare a snapshot file for being removed.
|
||||
*/
|
||||
void
|
||||
ffs_snapremove(vp)
|
||||
struct vnode *vp;
|
||||
ffs_snapremove(struct vnode *vp)
|
||||
{
|
||||
struct inode *ip = VTOI(vp), *xp;
|
||||
struct vnode *devvp = ip->i_devvp;
|
||||
@ -1507,12 +1458,8 @@ ffs_snapremove(vp)
|
||||
* must always have been allocated from a BLK_NOCOPY location.
|
||||
*/
|
||||
int
|
||||
ffs_snapblkfree(fs, devvp, bno, size, inum)
|
||||
struct fs *fs;
|
||||
struct vnode *devvp;
|
||||
ufs2_daddr_t bno;
|
||||
long size;
|
||||
ino_t inum;
|
||||
ffs_snapblkfree(struct fs *fs, struct vnode *devvp, ufs2_daddr_t bno,
|
||||
long size, ino_t inum)
|
||||
{
|
||||
struct ufsmount *ump = VFSTOUFS(devvp->v_specmountpoint);
|
||||
struct buf *ibp;
|
||||
@ -1688,8 +1635,7 @@ retry:
|
||||
* Associate snapshot files when mounting.
|
||||
*/
|
||||
void
|
||||
ffs_snapshot_mount(mp)
|
||||
struct mount *mp;
|
||||
ffs_snapshot_mount(struct mount *mp)
|
||||
{
|
||||
struct ufsmount *ump = VFSTOUFS(mp);
|
||||
struct vnode *devvp = ump->um_devvp;
|
||||
@ -1829,8 +1775,7 @@ ffs_snapshot_mount(mp)
|
||||
* Disassociate snapshot files when unmounting.
|
||||
*/
|
||||
void
|
||||
ffs_snapshot_unmount(mp)
|
||||
struct mount *mp;
|
||||
ffs_snapshot_unmount(struct mount *mp)
|
||||
{
|
||||
struct ufsmount *ump = VFSTOUFS(mp);
|
||||
struct vnode *devvp = ump->um_devvp;
|
||||
@ -1865,9 +1810,7 @@ ffs_snapshot_unmount(mp)
|
||||
* copying the block if necessary.
|
||||
*/
|
||||
static int
|
||||
ffs_copyonwrite(v, bp)
|
||||
void *v;
|
||||
struct buf *bp;
|
||||
ffs_copyonwrite(void *v, struct buf *bp)
|
||||
{
|
||||
struct buf *ibp;
|
||||
struct fs *fs;
|
||||
@ -2034,10 +1977,7 @@ retry:
|
||||
* Read the specified block from disk. Vp is usually a snapshot vnode.
|
||||
*/
|
||||
static int
|
||||
readfsblk(vp, data, lbn)
|
||||
struct vnode *vp;
|
||||
caddr_t data;
|
||||
ufs2_daddr_t lbn;
|
||||
readfsblk(struct vnode *vp, caddr_t data, ufs2_daddr_t lbn)
|
||||
{
|
||||
int s, error;
|
||||
struct inode *ip = VTOI(vp);
|
||||
@ -2073,10 +2013,7 @@ readfsblk(vp, data, lbn)
|
||||
* Read the specified block. Bypass UBC to prevent deadlocks.
|
||||
*/
|
||||
static int
|
||||
readvnblk(vp, data, lbn)
|
||||
struct vnode *vp;
|
||||
caddr_t data;
|
||||
ufs2_daddr_t lbn;
|
||||
readvnblk(struct vnode *vp, caddr_t data, ufs2_daddr_t lbn)
|
||||
{
|
||||
int error;
|
||||
daddr_t bn;
|
||||
@ -2109,10 +2046,7 @@ readvnblk(vp, data, lbn)
|
||||
* Write the specified block. Bypass UBC to prevent deadlocks.
|
||||
*/
|
||||
static int
|
||||
writevnblk(vp, data, lbn)
|
||||
struct vnode *vp;
|
||||
caddr_t data;
|
||||
ufs2_daddr_t lbn;
|
||||
writevnblk(struct vnode *vp, caddr_t data, ufs2_daddr_t lbn)
|
||||
{
|
||||
int s, error;
|
||||
off_t offset;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ffs_softdep.stub.c,v 1.14 2005/02/26 22:32:20 perry Exp $ */
|
||||
/* $NetBSD: ffs_softdep.stub.c,v 1.15 2005/07/15 05:01:16 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Marshall Kirk McKusick. All Rights Reserved.
|
||||
@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_softdep.stub.c,v 1.14 2005/02/26 22:32:20 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_softdep.stub.c,v 1.15 2005/07/15 05:01:16 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/vnode.h>
|
||||
@ -45,218 +45,159 @@ __KERNEL_RCSID(0, "$NetBSD: ffs_softdep.stub.c,v 1.14 2005/02/26 22:32:20 perry
|
||||
#include <ufs/ufs/ufs_extern.h>
|
||||
|
||||
int
|
||||
softdep_flushworklist(oldmnt, countp, p)
|
||||
struct mount *oldmnt;
|
||||
int *countp;
|
||||
struct proc *p;
|
||||
softdep_flushworklist(struct mount *oldmnt, int *countp, struct proc *p)
|
||||
{
|
||||
|
||||
panic("softdep_flushworklist called");
|
||||
}
|
||||
|
||||
int
|
||||
softdep_flushfiles(oldmnt, flags, p)
|
||||
struct mount *oldmnt;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
softdep_flushfiles(struct mount *oldmnt, int flags, struct proc *p)
|
||||
{
|
||||
|
||||
panic("softdep_flushfiles called");
|
||||
}
|
||||
|
||||
int
|
||||
softdep_mount(devvp, mp, fs, cred)
|
||||
struct vnode *devvp;
|
||||
struct mount *mp;
|
||||
struct fs *fs;
|
||||
struct ucred *cred;
|
||||
softdep_mount(struct vnode *devvp, struct mount *mp, struct fs *fs,
|
||||
struct ucred *cred)
|
||||
{
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
softdep_initialize()
|
||||
softdep_initialize(void)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
softdep_reinitialize()
|
||||
softdep_reinitialize(void)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
softdep_setup_inomapdep(bp, ip, newinum)
|
||||
struct buf *bp;
|
||||
struct inode *ip;
|
||||
ino_t newinum;
|
||||
softdep_setup_inomapdep(struct buf *bp, struct inode *ip, ino_t newinum)
|
||||
{
|
||||
|
||||
panic("softdep_setup_inomapdep called");
|
||||
}
|
||||
|
||||
void
|
||||
softdep_setup_blkmapdep(bp, fs, newblkno)
|
||||
struct buf *bp;
|
||||
struct fs *fs;
|
||||
daddr_t newblkno;
|
||||
softdep_setup_blkmapdep(struct buf *bp, struct fs *fs, daddr_t newblkno)
|
||||
{
|
||||
|
||||
panic("softdep_setup_blkmapdep called");
|
||||
}
|
||||
|
||||
void
|
||||
softdep_setup_allocdirect(ip, lbn, newblkno, oldblkno, newsize, oldsize, bp)
|
||||
struct inode *ip;
|
||||
daddr_t lbn;
|
||||
daddr_t newblkno;
|
||||
daddr_t oldblkno;
|
||||
long newsize;
|
||||
long oldsize;
|
||||
struct buf *bp;
|
||||
softdep_setup_allocdirect(struct inode *ip, daddr_t lbn, daddr_t newblkno,
|
||||
daddr_t oldblkno, long newsize, long oldsize, struct buf *bp)
|
||||
{
|
||||
|
||||
panic("softdep_setup_allocdirect called");
|
||||
}
|
||||
|
||||
void
|
||||
softdep_setup_allocindir_page(ip, lbn, bp, ptrno, newblkno, oldblkno, nbp)
|
||||
struct inode *ip;
|
||||
daddr_t lbn;
|
||||
struct buf *bp;
|
||||
int ptrno;
|
||||
daddr_t newblkno;
|
||||
daddr_t oldblkno;
|
||||
struct buf *nbp;
|
||||
softdep_setup_allocindir_page(struct inode *ip, daddr_t lbn, struct buf *bp,
|
||||
int ptrno, daddr_t newblkno, daddr_t oldblkno, struct buf *nbp)
|
||||
{
|
||||
|
||||
panic("softdep_setup_allocindir_page called");
|
||||
}
|
||||
|
||||
void
|
||||
softdep_setup_allocindir_meta(nbp, ip, bp, ptrno, newblkno)
|
||||
struct buf *nbp;
|
||||
struct inode *ip;
|
||||
struct buf *bp;
|
||||
int ptrno;
|
||||
daddr_t newblkno;
|
||||
softdep_setup_allocindir_meta(struct buf *nbp, struct inode *ip, struct buf *bp,
|
||||
int ptrno, daddr_t newblkno)
|
||||
{
|
||||
|
||||
panic("softdep_setup_allocindir_meta called");
|
||||
}
|
||||
|
||||
void
|
||||
softdep_setup_freeblocks(ip, length, flags)
|
||||
struct inode *ip;
|
||||
off_t length;
|
||||
int flags;
|
||||
softdep_setup_freeblocks(struct inode *ip, off_t length, int flags)
|
||||
{
|
||||
|
||||
panic("softdep_setup_freeblocks called");
|
||||
}
|
||||
|
||||
void
|
||||
softdep_freefile(v)
|
||||
void *v;
|
||||
softdep_freefile(void *v)
|
||||
{
|
||||
panic("softdep_freefile called");
|
||||
}
|
||||
|
||||
int
|
||||
softdep_setup_directory_add(bp, dp, diroffset, newinum, newdirbp, isnewblk)
|
||||
struct buf *bp;
|
||||
struct inode *dp;
|
||||
off_t diroffset;
|
||||
ino_t newinum;
|
||||
struct buf *newdirbp;
|
||||
int isnewblk;
|
||||
softdep_setup_directory_add(struct buf *bp, struct inode *dp, off_t diroffset,
|
||||
ino_t newinum, struct buf *newdirbp, int isnewblk)
|
||||
{
|
||||
|
||||
panic("softdep_setup_directory_add called");
|
||||
}
|
||||
|
||||
void
|
||||
softdep_change_directoryentry_offset(dp, base, oldloc, newloc, entrysize)
|
||||
struct inode *dp;
|
||||
caddr_t base;
|
||||
caddr_t oldloc;
|
||||
caddr_t newloc;
|
||||
int entrysize;
|
||||
softdep_change_directoryentry_offset(struct inode *dp, caddr_t base,
|
||||
caddr_t oldloc, caddr_t newloc, int entrysize)
|
||||
{
|
||||
|
||||
panic("softdep_change_directoryentry_offset called");
|
||||
}
|
||||
|
||||
void
|
||||
softdep_setup_remove(bp, dp, ip, isrmdir)
|
||||
struct buf *bp;
|
||||
struct inode *dp;
|
||||
struct inode *ip;
|
||||
int isrmdir;
|
||||
softdep_setup_remove(struct buf *bp, struct inode *dp, struct inode *ip,
|
||||
int isrmdir)
|
||||
{
|
||||
|
||||
panic("softdep_setup_remove called");
|
||||
}
|
||||
|
||||
void
|
||||
softdep_setup_directory_change(bp, dp, ip, newinum, isrmdir)
|
||||
struct buf *bp;
|
||||
struct inode *dp;
|
||||
struct inode *ip;
|
||||
ino_t newinum;
|
||||
int isrmdir;
|
||||
softdep_setup_directory_change(struct buf *bp, struct inode *dp,
|
||||
struct inode *ip, ino_t newinum, int isrmdir)
|
||||
{
|
||||
|
||||
panic("softdep_setup_directory_change called");
|
||||
}
|
||||
|
||||
void
|
||||
softdep_change_linkcnt(ip)
|
||||
struct inode *ip;
|
||||
softdep_change_linkcnt(struct inode *ip)
|
||||
{
|
||||
|
||||
panic("softdep_change_linkcnt called");
|
||||
}
|
||||
|
||||
void
|
||||
softdep_load_inodeblock(ip)
|
||||
struct inode *ip;
|
||||
softdep_load_inodeblock(struct inode *ip)
|
||||
{
|
||||
|
||||
panic("softdep_load_inodeblock called");
|
||||
}
|
||||
|
||||
void
|
||||
softdep_update_inodeblock(ip, bp, waitfor)
|
||||
struct inode *ip;
|
||||
struct buf *bp;
|
||||
int waitfor;
|
||||
softdep_update_inodeblock(struct inode *ip, struct buf *bp, int waitfor)
|
||||
{
|
||||
|
||||
panic("softdep_update_inodeblock called");
|
||||
}
|
||||
|
||||
void
|
||||
softdep_fsync_mountdev(vp)
|
||||
struct vnode *vp;
|
||||
softdep_fsync_mountdev(struct vnode *vp)
|
||||
{
|
||||
panic("softdep_fsync_mountdev called");
|
||||
}
|
||||
|
||||
int
|
||||
softdep_sync_metadata(v)
|
||||
void *v;
|
||||
softdep_sync_metadata(void *v)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
softdep_releasefile(ip)
|
||||
struct inode *ip;
|
||||
softdep_releasefile(struct inode *ip)
|
||||
{
|
||||
panic("softdep_releasefile called");
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ffs_subr.c,v 1.33 2005/02/26 22:32:20 perry Exp $ */
|
||||
/* $NetBSD: ffs_subr.c,v 1.34 2005/07/15 05:01:16 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
@ -36,7 +36,7 @@
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.33 2005/02/26 22:32:20 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.34 2005/07/15 05:01:16 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
@ -72,8 +72,7 @@ void panic __P((const char *, ...))
|
||||
* remaining space in the directory.
|
||||
*/
|
||||
int
|
||||
ffs_blkatoff(v)
|
||||
void *v;
|
||||
ffs_blkatoff(void *v)
|
||||
{
|
||||
struct vop_blkatoff_args /* {
|
||||
struct vnode *a_vp;
|
||||
@ -109,11 +108,7 @@ ffs_blkatoff(v)
|
||||
* to the incore copy.
|
||||
*/
|
||||
void
|
||||
ffs_load_inode(bp, ip, fs, ino)
|
||||
struct buf *bp;
|
||||
struct inode *ip;
|
||||
struct fs *fs;
|
||||
ino_t ino;
|
||||
ffs_load_inode(struct buf *bp, struct inode *ip, struct fs *fs, ino_t ino)
|
||||
{
|
||||
struct ufs1_dinode *dp1;
|
||||
struct ufs2_dinode *dp2;
|
||||
@ -160,12 +155,8 @@ ffs_load_inode(bp, ip, fs, ino)
|
||||
* of some frags.
|
||||
*/
|
||||
void
|
||||
ffs_fragacct(fs, fragmap, fraglist, cnt, needswap)
|
||||
struct fs *fs;
|
||||
int fragmap;
|
||||
int32_t fraglist[];
|
||||
int cnt;
|
||||
int needswap;
|
||||
ffs_fragacct(struct fs *fs, int fragmap, int32_t fraglist[], int cnt,
|
||||
int needswap)
|
||||
{
|
||||
int inblk;
|
||||
int field, subfield;
|
||||
@ -195,9 +186,7 @@ ffs_fragacct(fs, fragmap, fraglist, cnt, needswap)
|
||||
|
||||
#if defined(_KERNEL) && defined(DIAGNOSTIC)
|
||||
void
|
||||
ffs_checkoverlap(bp, ip)
|
||||
struct buf *bp;
|
||||
struct inode *ip;
|
||||
ffs_checkoverlap(struct buf *bp, struct inode *ip)
|
||||
{
|
||||
#if 0
|
||||
struct buf *ebp, *ep;
|
||||
@ -240,10 +229,7 @@ ffs_checkoverlap(bp, ip)
|
||||
* returns false if any corresponding bit in the free map is 0
|
||||
*/
|
||||
int
|
||||
ffs_isblock(fs, cp, h)
|
||||
struct fs *fs;
|
||||
u_char *cp;
|
||||
int32_t h;
|
||||
ffs_isblock(struct fs *fs, u_char *cp, int32_t h)
|
||||
{
|
||||
u_char mask;
|
||||
|
||||
@ -271,10 +257,7 @@ ffs_isblock(fs, cp, h)
|
||||
* returns false if any corresponding bit in the free map is 1
|
||||
*/
|
||||
int
|
||||
ffs_isfreeblock(fs, cp, h)
|
||||
struct fs *fs;
|
||||
u_char *cp;
|
||||
int32_t h;
|
||||
ffs_isfreeblock(struct fs *fs, u_char *cp, int32_t h)
|
||||
{
|
||||
|
||||
switch ((int)fs->fs_fragshift) {
|
||||
@ -296,10 +279,7 @@ ffs_isfreeblock(fs, cp, h)
|
||||
* take a block out of the map
|
||||
*/
|
||||
void
|
||||
ffs_clrblock(fs, cp, h)
|
||||
struct fs *fs;
|
||||
u_char *cp;
|
||||
int32_t h;
|
||||
ffs_clrblock(struct fs *fs, u_char *cp, int32_t h)
|
||||
{
|
||||
|
||||
switch ((int)fs->fs_fragshift) {
|
||||
@ -325,10 +305,7 @@ ffs_clrblock(fs, cp, h)
|
||||
* put a block into the map
|
||||
*/
|
||||
void
|
||||
ffs_setblock(fs, cp, h)
|
||||
struct fs *fs;
|
||||
u_char *cp;
|
||||
int32_t h;
|
||||
ffs_setblock(struct fs *fs, u_char *cp, int32_t h)
|
||||
{
|
||||
|
||||
switch ((int)fs->fs_fragshift) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ffs_vfsops.c,v 1.165 2005/06/28 09:30:38 yamt Exp $ */
|
||||
/* $NetBSD: ffs_vfsops.c,v 1.166 2005/07/15 05:01:16 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1991, 1993, 1994
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.165 2005/06/28 09:30:38 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.166 2005/07/15 05:01:16 thorpej Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_ffs.h"
|
||||
@ -134,7 +134,7 @@ static void ffs_oldfscompat_write(struct fs *, struct ufsmount *);
|
||||
*/
|
||||
|
||||
int
|
||||
ffs_mountroot()
|
||||
ffs_mountroot(void)
|
||||
{
|
||||
struct fs *fs;
|
||||
struct mount *mp;
|
||||
@ -174,12 +174,8 @@ ffs_mountroot()
|
||||
* mount system call
|
||||
*/
|
||||
int
|
||||
ffs_mount(mp, path, data, ndp, p)
|
||||
struct mount *mp;
|
||||
const char *path;
|
||||
void *data;
|
||||
struct nameidata *ndp;
|
||||
struct proc *p;
|
||||
ffs_mount(struct mount *mp, const char *path, void *data,
|
||||
struct nameidata *ndp, struct proc *p)
|
||||
{
|
||||
struct vnode *devvp = NULL;
|
||||
struct ufs_args args;
|
||||
@ -474,10 +470,7 @@ fail:
|
||||
* 6) re-read inode data for all active vnodes.
|
||||
*/
|
||||
int
|
||||
ffs_reload(mp, cred, p)
|
||||
struct mount *mp;
|
||||
struct ucred *cred;
|
||||
struct proc *p;
|
||||
ffs_reload(struct mount *mp, struct ucred *cred, struct proc *p)
|
||||
{
|
||||
struct vnode *vp, *nvp, *devvp;
|
||||
struct inode *ip;
|
||||
@ -694,10 +687,7 @@ static const int sblock_try[] = SBLOCKSEARCH;
|
||||
* Common code for mount and mountroot
|
||||
*/
|
||||
int
|
||||
ffs_mountfs(devvp, mp, p)
|
||||
struct vnode *devvp;
|
||||
struct mount *mp;
|
||||
struct proc *p;
|
||||
ffs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p)
|
||||
{
|
||||
struct ufsmount *ump;
|
||||
struct buf *bp;
|
||||
@ -1010,10 +1000,7 @@ out:
|
||||
* Unfortunately new bits get added.
|
||||
*/
|
||||
static void
|
||||
ffs_oldfscompat_read(fs, ump, sblockloc)
|
||||
struct fs *fs;
|
||||
struct ufsmount *ump;
|
||||
daddr_t sblockloc;
|
||||
ffs_oldfscompat_read(struct fs *fs, struct ufsmount *ump, daddr_t sblockloc)
|
||||
{
|
||||
off_t maxfilesize;
|
||||
int32_t *extrasave;
|
||||
@ -1090,9 +1077,7 @@ ffs_oldfscompat_read(fs, ump, sblockloc)
|
||||
* Unfortunately new bits get added.
|
||||
*/
|
||||
static void
|
||||
ffs_oldfscompat_write(fs, ump)
|
||||
struct fs *fs;
|
||||
struct ufsmount *ump;
|
||||
ffs_oldfscompat_write(struct fs *fs, struct ufsmount *ump)
|
||||
{
|
||||
int32_t *extrasave;
|
||||
|
||||
@ -1126,10 +1111,7 @@ ffs_oldfscompat_write(fs, ump)
|
||||
* unmount system call
|
||||
*/
|
||||
int
|
||||
ffs_unmount(mp, mntflags, p)
|
||||
struct mount *mp;
|
||||
int mntflags;
|
||||
struct proc *p;
|
||||
ffs_unmount(struct mount *mp, int mntflags, struct proc *p)
|
||||
{
|
||||
struct ufsmount *ump;
|
||||
struct fs *fs;
|
||||
@ -1191,10 +1173,7 @@ ffs_unmount(mp, mntflags, p)
|
||||
* Flush out all the files in a filesystem.
|
||||
*/
|
||||
int
|
||||
ffs_flushfiles(mp, flags, p)
|
||||
struct mount *mp;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
ffs_flushfiles(struct mount *mp, int flags, struct proc *p)
|
||||
{
|
||||
extern int doforce;
|
||||
struct ufsmount *ump;
|
||||
@ -1241,10 +1220,7 @@ ffs_flushfiles(mp, flags, p)
|
||||
* Get file system statistics.
|
||||
*/
|
||||
int
|
||||
ffs_statvfs(mp, sbp, p)
|
||||
struct mount *mp;
|
||||
struct statvfs *sbp;
|
||||
struct proc *p;
|
||||
ffs_statvfs(struct mount *mp, struct statvfs *sbp, struct proc *p)
|
||||
{
|
||||
struct ufsmount *ump;
|
||||
struct fs *fs;
|
||||
@ -1279,11 +1255,7 @@ ffs_statvfs(mp, sbp, p)
|
||||
* Note: we are always called with the filesystem marked `MPBUSY'.
|
||||
*/
|
||||
int
|
||||
ffs_sync(mp, waitfor, cred, p)
|
||||
struct mount *mp;
|
||||
int waitfor;
|
||||
struct ucred *cred;
|
||||
struct proc *p;
|
||||
ffs_sync(struct mount *mp, int waitfor, struct ucred *cred, struct proc *p)
|
||||
{
|
||||
struct vnode *vp, *nvp;
|
||||
struct inode *ip;
|
||||
@ -1385,10 +1357,7 @@ loop:
|
||||
* done by the calling routine.
|
||||
*/
|
||||
int
|
||||
ffs_vget(mp, ino, vpp)
|
||||
struct mount *mp;
|
||||
ino_t ino;
|
||||
struct vnode **vpp;
|
||||
ffs_vget(struct mount *mp, ino_t ino, struct vnode **vpp)
|
||||
{
|
||||
struct fs *fs;
|
||||
struct inode *ip;
|
||||
@ -1525,10 +1494,7 @@ ffs_vget(mp, ino, vpp)
|
||||
* those rights via. exflagsp and credanonp
|
||||
*/
|
||||
int
|
||||
ffs_fhtovp(mp, fhp, vpp)
|
||||
struct mount *mp;
|
||||
struct fid *fhp;
|
||||
struct vnode **vpp;
|
||||
ffs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp)
|
||||
{
|
||||
struct ufid *ufhp;
|
||||
struct fs *fs;
|
||||
@ -1546,9 +1512,7 @@ ffs_fhtovp(mp, fhp, vpp)
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
ffs_vptofh(vp, fhp)
|
||||
struct vnode *vp;
|
||||
struct fid *fhp;
|
||||
ffs_vptofh(struct vnode *vp, struct fid *fhp)
|
||||
{
|
||||
struct inode *ip;
|
||||
struct ufid *ufhp;
|
||||
@ -1562,7 +1526,7 @@ ffs_vptofh(vp, fhp)
|
||||
}
|
||||
|
||||
void
|
||||
ffs_init()
|
||||
ffs_init(void)
|
||||
{
|
||||
if (ffs_initcount++ > 0)
|
||||
return;
|
||||
@ -1580,14 +1544,14 @@ ffs_init()
|
||||
}
|
||||
|
||||
void
|
||||
ffs_reinit()
|
||||
ffs_reinit(void)
|
||||
{
|
||||
softdep_reinitialize();
|
||||
ufs_reinit();
|
||||
}
|
||||
|
||||
void
|
||||
ffs_done()
|
||||
ffs_done(void)
|
||||
{
|
||||
if (--ffs_initcount > 0)
|
||||
return;
|
||||
@ -1654,9 +1618,7 @@ SYSCTL_SETUP(sysctl_vfs_ffs_setup, "sysctl vfs.ffs subtree setup")
|
||||
* Write a superblock and associated information back to disk.
|
||||
*/
|
||||
int
|
||||
ffs_sbupdate(mp, waitfor)
|
||||
struct ufsmount *mp;
|
||||
int waitfor;
|
||||
ffs_sbupdate(struct ufsmount *mp, int waitfor)
|
||||
{
|
||||
struct fs *fs = mp->um_fs;
|
||||
struct buf *bp;
|
||||
@ -1686,9 +1648,7 @@ ffs_sbupdate(mp, waitfor)
|
||||
}
|
||||
|
||||
int
|
||||
ffs_cgupdate(mp, waitfor)
|
||||
struct ufsmount *mp;
|
||||
int waitfor;
|
||||
ffs_cgupdate(struct ufsmount *mp, int waitfor)
|
||||
{
|
||||
struct fs *fs = mp->um_fs;
|
||||
struct buf *bp;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ffs_vnops.c,v 1.69 2005/02/26 22:32:20 perry Exp $ */
|
||||
/* $NetBSD: ffs_vnops.c,v 1.70 2005/07/15 05:01:16 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_vnops.c,v 1.69 2005/02/26 22:32:20 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_vnops.c,v 1.70 2005/07/15 05:01:16 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -234,8 +234,7 @@ const struct vnodeopv_desc ffs_fifoop_opv_desc =
|
||||
#include <ufs/ufs/ufs_readwrite.c>
|
||||
|
||||
int
|
||||
ffs_fsync(v)
|
||||
void *v;
|
||||
ffs_fsync(void *v)
|
||||
{
|
||||
struct vop_fsync_args /* {
|
||||
struct vnode *a_vp;
|
||||
@ -335,8 +334,7 @@ ffs_fsync(v)
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
ffs_full_fsync(v)
|
||||
void *v;
|
||||
ffs_full_fsync(void *v)
|
||||
{
|
||||
struct vop_fsync_args /* {
|
||||
struct vnode *a_vp;
|
||||
@ -474,8 +472,7 @@ loop:
|
||||
* Reclaim an inode so that it can be used for other purposes.
|
||||
*/
|
||||
int
|
||||
ffs_reclaim(v)
|
||||
void *v;
|
||||
ffs_reclaim(void *v)
|
||||
{
|
||||
struct vop_reclaim_args /* {
|
||||
struct vnode *a_vp;
|
||||
|
Loading…
Reference in New Issue
Block a user