mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
DEVEL15-shutdown-cleanup-20071213
LICENSE IPL10 get rid of cold_shutdown; it's in afs_prototypes.h. log when we don't clean up memory (cherry picked from commit b33fb96fff39c421064d03ff058dde76f2aeed8b)
This commit is contained in:
parent
8cf0381646
commit
eecd963f65
@ -272,8 +272,6 @@ afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
|
||||
void
|
||||
shutdown_osifile(void)
|
||||
{
|
||||
extern int afs_cold_shutdown;
|
||||
|
||||
AFS_STATCNT(shutdown_osifile);
|
||||
if (afs_cold_shutdown) {
|
||||
afs_osicred_initialized = 0;
|
||||
|
@ -34,8 +34,6 @@ extern struct afs_exporter *afs_nfsexporter;
|
||||
struct vfs *afs_globalVFS = 0;
|
||||
struct vcache *afs_globalVp = 0;
|
||||
|
||||
extern int afs_cold_shutdown;
|
||||
|
||||
static int afs_root_nolock(struct vfs *afsp, struct vnode **avpp);
|
||||
|
||||
static int
|
||||
|
@ -418,8 +418,6 @@ afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
|
||||
void
|
||||
shutdown_osifile(void)
|
||||
{
|
||||
extern int afs_cold_shutdown;
|
||||
|
||||
AFS_STATCNT(shutdown_osifile);
|
||||
if (afs_cold_shutdown) {
|
||||
afs_osicred_initialized = 0;
|
||||
|
@ -279,8 +279,6 @@ afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
|
||||
void
|
||||
shutdown_osifile(void)
|
||||
{
|
||||
extern int afs_cold_shutdown;
|
||||
|
||||
AFS_STATCNT(shutdown_osifile);
|
||||
if (afs_cold_shutdown) {
|
||||
afs_osicred_initialized = 0;
|
||||
|
@ -244,8 +244,6 @@ afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
|
||||
void
|
||||
shutdown_osifile(void)
|
||||
{
|
||||
extern int afs_cold_shutdown;
|
||||
|
||||
AFS_STATCNT(shutdown_osifile);
|
||||
if (afs_cold_shutdown) {
|
||||
afs_osicred_initialized = 0;
|
||||
|
@ -223,8 +223,6 @@ afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
|
||||
void
|
||||
shutdown_osifile(void)
|
||||
{
|
||||
extern int afs_cold_shutdown;
|
||||
|
||||
AFS_STATCNT(shutdown_osifile);
|
||||
if (afs_cold_shutdown) {
|
||||
afs_osicred_initialized = 0;
|
||||
|
@ -262,8 +262,6 @@ afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
|
||||
void
|
||||
shutdown_osifile(void)
|
||||
{
|
||||
extern int afs_cold_shutdown;
|
||||
|
||||
AFS_STATCNT(shutdown_osifile);
|
||||
if (afs_cold_shutdown) {
|
||||
afs_osicred_initialized = 0;
|
||||
|
@ -207,7 +207,6 @@ afs_unmount(OSI_VFS_ARG(afsp), flags, cr)
|
||||
int flags;
|
||||
cred_t *cr;
|
||||
{
|
||||
extern int afs_afs_cold_shutdown;
|
||||
struct vcache *tvc;
|
||||
vnode_t *vp, *rootvp = NULL;
|
||||
register struct afs_q *tq;
|
||||
|
@ -349,8 +349,6 @@ afs_osi_MapStrategy(int (*aproc) (struct buf * bp), register struct buf *bp)
|
||||
void
|
||||
shutdown_osifile(void)
|
||||
{
|
||||
extern int afs_cold_shutdown;
|
||||
|
||||
AFS_STATCNT(shutdown_osifile);
|
||||
if (afs_cold_shutdown) {
|
||||
afs_osicred_initialized = 0;
|
||||
|
@ -224,8 +224,6 @@ afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
|
||||
void
|
||||
shutdown_osifile(void)
|
||||
{
|
||||
extern int afs_cold_shutdown;
|
||||
|
||||
AFS_STATCNT(shutdown_osifile);
|
||||
if (afs_cold_shutdown) {
|
||||
afs_osicred_initialized = 0;
|
||||
|
@ -398,8 +398,6 @@ afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
|
||||
void
|
||||
shutdown_osifile(void)
|
||||
{
|
||||
extern int afs_cold_shutdown;
|
||||
|
||||
AFS_STATCNT(shutdown_osifile);
|
||||
if (afs_cold_shutdown) {
|
||||
afs_osicred_initialized = 0;
|
||||
|
@ -534,7 +534,6 @@ shutdown_bufferpackage(void)
|
||||
register struct buffer *tp;
|
||||
#endif
|
||||
int i;
|
||||
extern int afs_cold_shutdown;
|
||||
|
||||
AFS_STATCNT(shutdown_bufferpackage);
|
||||
/* Free all allocated Buffers and associated buffer pages */
|
||||
|
@ -227,29 +227,34 @@ osi_AllocSmallSpace(size_t size)
|
||||
void
|
||||
shutdown_osinet(void)
|
||||
{
|
||||
extern int afs_cold_shutdown;
|
||||
|
||||
AFS_STATCNT(shutdown_osinet);
|
||||
if (afs_cold_shutdown) {
|
||||
struct osi_packet *tp;
|
||||
|
||||
while ((tp = freePacketList)) {
|
||||
freePacketList = tp->next;
|
||||
afs_osi_Free(tp, AFS_LRALLOCSIZ);
|
||||
#ifdef KERNEL_HAVE_PIN
|
||||
unpin(tp, AFS_LRALLOCSIZ);
|
||||
#endif
|
||||
afs_osi_Free(tp, AFS_LRALLOCSIZ);
|
||||
}
|
||||
|
||||
while ((tp = freeSmallList)) {
|
||||
freeSmallList = tp->next;
|
||||
afs_osi_Free(tp, AFS_SMALLOCSIZ);
|
||||
#ifdef KERNEL_HAVE_PIN
|
||||
unpin(tp, AFS_SMALLOCSIZ);
|
||||
#endif
|
||||
afs_osi_Free(tp, AFS_SMALLOCSIZ);
|
||||
}
|
||||
LOCK_INIT(&osi_fsplock, "osi_fsplock");
|
||||
LOCK_INIT(&osi_flplock, "osi_flplock");
|
||||
}
|
||||
if (afs_stats_cmperf.LargeBlocksActive ||
|
||||
afs_stats_cmperf.SmallBlocksActive)
|
||||
{
|
||||
afs_warn("WARNING: not all blocks freed: large %d small %d\n",
|
||||
afs_stats_cmperf.LargeBlocksActive,
|
||||
afs_stats_cmperf.SmallBlocksActive);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user