Softdep is mature enough that it shouldn't define DEBUG and DIAGNOSTIC
unconditionally.
This commit is contained in:
parent
d658fd6e12
commit
fa033b67e7
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ffs_softdep.c,v 1.36 2002/11/24 11:09:13 scw Exp $ */
|
/* $NetBSD: ffs_softdep.c,v 1.37 2002/11/30 20:27:50 kristerw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 1998 Marshall Kirk McKusick. All Rights Reserved.
|
* Copyright 1998 Marshall Kirk McKusick. All Rights Reserved.
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: ffs_softdep.c,v 1.36 2002/11/24 11:09:13 scw Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: ffs_softdep.c,v 1.37 2002/11/30 20:27:50 kristerw Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/buf.h>
|
#include <sys/buf.h>
|
||||||
|
@ -59,16 +59,6 @@ __KERNEL_RCSID(0, "$NetBSD: ffs_softdep.c,v 1.36 2002/11/24 11:09:13 scw Exp $")
|
||||||
struct pool sdpcpool;
|
struct pool sdpcpool;
|
||||||
u_int softdep_lockedbufs;
|
u_int softdep_lockedbufs;
|
||||||
|
|
||||||
/*
|
|
||||||
* For now we want the safety net that the DIAGNOSTIC and DEBUG flags provide.
|
|
||||||
*/
|
|
||||||
#ifndef DIAGNOSTIC
|
|
||||||
#define DIAGNOSTIC
|
|
||||||
#endif
|
|
||||||
#ifndef DEBUG
|
|
||||||
#define DEBUG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These definitions need to be adapted to the system to which
|
* These definitions need to be adapted to the system to which
|
||||||
* this file is being ported.
|
* this file is being ported.
|
||||||
|
@ -494,7 +484,8 @@ softdep_freequeue_process(void)
|
||||||
(item)->wk_state &= ~ONWORKLIST; \
|
(item)->wk_state &= ~ONWORKLIST; \
|
||||||
LIST_REMOVE(item, wk_list); \
|
LIST_REMOVE(item, wk_list); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define WORKITEM_FREE(item, type) softdep_freequeue_add(item, type)
|
#define WORKITEM_FREE(item, type) \
|
||||||
|
softdep_freequeue_add((struct worklist *)item)
|
||||||
|
|
||||||
#else /* DEBUG */
|
#else /* DEBUG */
|
||||||
static void worklist_insert __P((struct workhead *, struct worklist *));
|
static void worklist_insert __P((struct workhead *, struct worklist *));
|
||||||
|
@ -563,8 +554,10 @@ static int req_clear_remove; /* syncer process flush some freeblks */
|
||||||
*/
|
*/
|
||||||
static int stat_blk_limit_push; /* number of times block limit neared */
|
static int stat_blk_limit_push; /* number of times block limit neared */
|
||||||
static int stat_ino_limit_push; /* number of times inode limit neared */
|
static int stat_ino_limit_push; /* number of times inode limit neared */
|
||||||
|
#ifdef DEBUG
|
||||||
static int stat_blk_limit_hit; /* number of times block slowdown imposed */
|
static int stat_blk_limit_hit; /* number of times block slowdown imposed */
|
||||||
static int stat_ino_limit_hit; /* number of times inode slowdown imposed */
|
static int stat_ino_limit_hit; /* number of times inode slowdown imposed */
|
||||||
|
#endif
|
||||||
static int stat_indir_blk_ptrs; /* bufs redirtied as indir ptrs not written */
|
static int stat_indir_blk_ptrs; /* bufs redirtied as indir ptrs not written */
|
||||||
static int stat_inode_bitmap; /* bufs redirtied as inode bitmap not written */
|
static int stat_inode_bitmap; /* bufs redirtied as inode bitmap not written */
|
||||||
static int stat_direct_blk_ptrs;/* bufs redirtied as direct ptrs not written */
|
static int stat_direct_blk_ptrs;/* bufs redirtied as direct ptrs not written */
|
||||||
|
@ -3197,7 +3190,9 @@ handle_workitem_freefile(freefile)
|
||||||
{
|
{
|
||||||
struct vnode vp;
|
struct vnode vp;
|
||||||
struct inode tip;
|
struct inode tip;
|
||||||
|
#ifdef DEBUG
|
||||||
struct inodedep *idp;
|
struct inodedep *idp;
|
||||||
|
#endif
|
||||||
struct vop_vfree_args args;
|
struct vop_vfree_args args;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
|
@ -3390,7 +3385,9 @@ initiate_write_inodeblock(inodedep, bp)
|
||||||
struct allocdirect *adp, *lastadp;
|
struct allocdirect *adp, *lastadp;
|
||||||
struct dinode *dp;
|
struct dinode *dp;
|
||||||
struct fs *fs = inodedep->id_fs;
|
struct fs *fs = inodedep->id_fs;
|
||||||
|
#ifdef DIAGNOSTIC
|
||||||
ufs_lbn_t prevlbn = -1;
|
ufs_lbn_t prevlbn = -1;
|
||||||
|
#endif
|
||||||
int i, deplist;
|
int i, deplist;
|
||||||
#ifdef FFS_EI
|
#ifdef FFS_EI
|
||||||
const int needswap = UFS_FSNEEDSWAP(fs);
|
const int needswap = UFS_FSNEEDSWAP(fs);
|
||||||
|
|
Loading…
Reference in New Issue