MPOOLFILE *mfp;
memp_fset(dbmfp, pgaddr, flags)	DB_MPOOLFILE *dbmfp;	void *pgaddr;	int flags;{	BH *bhp;	DB_MPOOL *dbmp;	MPOOL *mp;	MPOOLFILE *mfp;	int ret;	dbmp = dbmfp->dbmp;	mfp = dbmfp->mfp;	mp = dbmp->mp;	/* Validate arguments. */	if (flags == 0)		return (__db_ferr(dbmp->dbenv, "memp_fset", 1));	if ((ret = __db_fchk(dbmp->dbenv, "memp_fset", flags,	    DB_MPOOL_DIRTY | DB_MPOOL_CLEAN | DB_MPOOL_DISCARD)) != 0)		return (ret);	if ((ret = __db_fcchk(dbmp->dbenv, "memp_fset",	    flags, DB_MPOOL_CLEAN, DB_MPOOL_DIRTY)) != 0)		return (ret);	if (LF_ISSET(DB_MPOOL_DIRTY) && F_ISSET(dbmfp, MP_READONLY)) {		__db_err(dbmp->dbenv,		    "%s: dirty flag set for readonly file page",		    __memp_fn(dbmfp));		return (EACCES);	}	/* Convert the page address to a buffer header. */	bhp = (BH *)((u_int8_t *)pgaddr - SSZA(BH, buf));	LOCKREGION(dbmp);	if (LF_ISSET(DB_MPOOL_CLEAN) && F_ISSET(bhp, BH_DIRTY)) {		++mp->stat.st_page_clean;		--mp->stat.st_page_dirty;		F_CLR(bhp, BH_DIRTY);	}	if (LF_ISSET(DB_MPOOL_DIRTY) && !F_ISSET(bhp, BH_DIRTY)) {		--mp->stat.st_page_clean;		++mp->stat.st_page_dirty;		F_SET(bhp, BH_DIRTY);	}	if (LF_ISSET(DB_MPOOL_DISCARD))		F_SET(bhp, BH_DISCARD);	UNLOCKREGION(dbmp);	return (0);}