Files
mars-nwe/include/core/include/hmc.h
Mario Fetka 41cf615b5c
All checks were successful
Source release / source-package (push) Successful in 1m19s
0521 core: import NSS configuration runtime base
2026-06-14 10:56:11 +02:00

85 lines
2.7 KiB
C

/****************************************************************************
|
| (C) Copyright 2006 Novell, Inc.
| All Rights Reserved.
|
| This program is free software; you can redistribute it and/or
| modify it under the terms of version 2 of the GNU General Public
| License as published by the Free Software Foundation.
|
| This program is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
| GNU General Public License for more details.
|
| You should have received a copy of the GNU General Public License
| along with this program; if not, contact Novell, Inc.
|
| To contact Novell about this file by physical or electronic mail,
| you may find current contact information at www.novell.com
|
|***************************************************************************
|
| NetWare Advance File Services (NSS) module
|
|---------------------------------------------------------------------------
|
|
|---------------------------------------------------------------------------
| This module is used to:
| This defines globals and prototypes HMC (Hign Memory Cache) system.
+-------------------------------------------------------------------------*/
#ifndef _HMC_H_
#define _HMC_H_
#ifndef _OMNI_H_
# include <library/omni.h>
#endif
#ifndef _QUE_H_
# include <library/que.h>
#endif
struct Buffer_s;
struct Pool_s;
struct inode;
struct page;
/*
Structure connected with every alloc_page that we are using to store
our meta-data blocks.
*/
typedef struct PageBuffer_s {
struct page *PB_Page; /* Linux page that we are using */
ADDR PB_KeyPart; /* Part of our key for lookup */
Blknum_t PB_FileBlk; /* Logical block because of FMAP blocks */
/* The NSS spinlock protects all of these links */
DQlink_t PB_LruLink; /* Link for Cache.lruQMetadataPage LRU */
DQlink_t PB_HashLink; /* Link for hash queue (For Lookup) */
DQlink_t PB_PoolLink; /* Link for PageBuffer_s associated with a pool */
} PageBuffer_s;
STATUS HMC_Shutdown( void );
STATUS HMC_Startup( void );
BOOL HMC_CopyDataToHimem(DQhead_t *poolHead, struct Buffer_s *buf, struct inode *inode);
BOOL HMC_CopyDataFromHimem(struct Buffer_s *buf, struct inode *inode);
void HMC_InvalidatePoolHimemPages( struct Pool_s *pool );
BOOL HMC_MarkNewestIfCached(struct inode *inode, Blknum_t volBlk );
BOOL HMC_UseHimem(const struct Buffer_s *buffer);
STATUS HMC_PrivateSizeSetUI(NINT newBlockTotal);
STATUS HMC_TypeSetUI( NINT cacheType );
#define HMC_CT_LINUX 1
#define HMC_CT_NONE 0
#define HMC_CT_PRIVATE 2
void HMC_UpdatePrivateCacheSizeUI(NINT newBlockTotal);
const char *HMC_CacheName(void);
#endif /* ifndef _HMC_H_ */