Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
61e41fb1
Commit
61e41fb1
authored
Jan 09, 2004
by
Nathan Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Fix ktrace code - dont build unilaterally, and do earlier init for pagebuf use.
SGI Modid: 2.5.x-xfs:slinx:160172a
parent
00d9eb99
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
50 deletions
+15
-50
fs/xfs/Makefile
fs/xfs/Makefile
+2
-1
fs/xfs/linux/xfs_super.c
fs/xfs/linux/xfs_super.c
+3
-0
fs/xfs/support/ktrace.c
fs/xfs/support/ktrace.c
+2
-26
fs/xfs/support/ktrace.h
fs/xfs/support/ktrace.h
+8
-12
fs/xfs/xfs_vfsops.c
fs/xfs/xfs_vfsops.c
+0
-11
No files found.
fs/xfs/Makefile
View file @
61e41fb1
...
...
@@ -131,12 +131,13 @@ xfs-y += $(addprefix linux/, \
# Objects in support/
xfs-y
+=
$(
addprefix
support/,
\
debug.o
\
ktrace.o
\
move.o
\
mrlock.o
\
qsort.o
\
uuid.o
)
xfs-$(CONFIG_XFS_TRACE)
+=
support/ktrace.o
# Quota and DMAPI stubs
xfs-y
+=
xfs_dmops.o
\
xfs_qmops.o
...
...
fs/xfs/linux/xfs_super.c
View file @
61e41fb1
...
...
@@ -869,6 +869,8 @@ init_xfs_fs( void )
si_meminfo
(
&
si
);
xfs_physmem
=
si
.
totalram
;
ktrace_init
(
64
);
error
=
init_inodecache
();
if
(
error
<
0
)
goto
undo_inodecache
;
...
...
@@ -907,6 +909,7 @@ exit_xfs_fs( void )
vfs_exitdmapi
();
pagebuf_terminate
();
destroy_inodecache
();
ktrace_uninit
();
}
module_init
(
init_xfs_fs
);
...
...
fs/xfs/support/ktrace.c
View file @
61e41fb1
/*
* Copyright (c) 2000-200
2
Silicon Graphics, Inc. All Rights Reserved.
* Copyright (c) 2000-200
3
Silicon Graphics, 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
...
...
@@ -40,8 +40,6 @@
#include "debug.h"
#include "ktrace.h"
#if (defined(DEBUG) || defined(CONFIG_XFS_VNODE_TRACING))
static
kmem_zone_t
*
ktrace_hdr_zone
;
static
kmem_zone_t
*
ktrace_ent_zone
;
static
int
ktrace_zentries
;
...
...
@@ -121,7 +119,6 @@ ktrace_alloc(int nentries, int sleep)
ktp
->
kt_nentries
=
nentries
;
ktp
->
kt_index
=
0
;
ktp
->
kt_rollover
=
0
;
return
ktp
;
}
...
...
@@ -235,7 +232,6 @@ ktrace_nentries(
return
(
ktp
->
kt_rollover
?
ktp
->
kt_nentries
:
ktp
->
kt_index
);
}
/*
* ktrace_first()
*
...
...
@@ -276,7 +272,7 @@ ktrace_first(ktrace_t *ktp, ktrace_snap_t *ktsp)
}
return
ktep
;
}
EXPORT_SYMBOL
(
ktrace_first
);
/*
* ktrace_next()
...
...
@@ -311,11 +307,7 @@ ktrace_next(
return
ktep
;
}
#if (defined(DEBUG) || defined(CONFIG_XFS_VNODE_TRACING))
EXPORT_SYMBOL
(
ktrace_first
);
EXPORT_SYMBOL
(
ktrace_next
);
#endif
/*
* ktrace_skip()
...
...
@@ -323,7 +315,6 @@ EXPORT_SYMBOL(ktrace_next);
* Skip the next "count" entries and return the entry after that.
* Return NULL if this causes us to iterate past the beginning again.
*/
ktrace_entry_t
*
ktrace_skip
(
ktrace_t
*
ktp
,
...
...
@@ -362,18 +353,3 @@ ktrace_skip(
}
return
ktep
;
}
#else
ktrace_t
*
ktrace_alloc
(
int
nentries
,
int
sleep
)
{
/*
* KM_SLEEP callers don't expect failure.
*/
if
(
sleep
&
KM_SLEEP
)
panic
(
"ktrace_alloc: NULL memory on KM_SLEEP request!"
);
return
NULL
;
}
#endif
fs/xfs/support/ktrace.h
View file @
61e41fb1
/*
* Copyright (c) 2000-200
2
Silicon Graphics, Inc. All Rights Reserved.
* Copyright (c) 2000-200
3
Silicon Graphics, 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
...
...
@@ -32,6 +32,7 @@
#ifndef __XFS_SUPPORT_KTRACE_H__
#define __XFS_SUPPORT_KTRACE_H__
#include <support/spin.h>
/*
* Trace buffer entry structure.
...
...
@@ -59,16 +60,13 @@ typedef struct ktrace_snap {
int
ks_index
;
/* current index */
}
ktrace_snap_t
;
/*
* Exported interfaces.
*/
extern
ktrace_t
*
ktrace_alloc
(
int
,
int
);
#if
(defined(DEBUG) || defined(CONFIG_XFS_VNODE_TRACING))
#if
def CONFIG_XFS_TRACE
extern
void
ktrace_init
(
int
zentries
);
extern
void
ktrace_uninit
(
void
);
extern
ktrace_t
*
ktrace_alloc
(
int
,
int
);
extern
void
ktrace_free
(
ktrace_t
*
);
extern
void
ktrace_enter
(
...
...
@@ -96,10 +94,8 @@ extern ktrace_entry_t *ktrace_next(ktrace_t *, ktrace_snap_t *);
extern
ktrace_entry_t
*
ktrace_skip
(
ktrace_t
*
,
int
,
ktrace_snap_t
*
);
#else
#define ktrace_init(x) do { } while (0)
#define ktrace_uninit() do { } while (0)
#endif
/* CONFIG_XFS_TRACE */
#define ktrace_free(ktp)
#define ktrace_enter(ktp,v0,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15)
#endif
#endif
/* __XFS_SUPPORT_KTRACE_H__ */
#endif
/* __XFS_SUPPORT_KTRACE_H__ */
fs/xfs/xfs_vfsops.c
View file @
61e41fb1
...
...
@@ -132,14 +132,6 @@ xfs_init(void)
"xfs_chashlist"
);
_ACL_ZONE_INIT
(
xfs_acl_zone
,
"xfs_acl"
);
#ifdef CONFIG_XFS_VNODE_TRACING
ktrace_init
(
VNODE_TRACE_SIZE
);
#else
#ifdef DEBUG
ktrace_init
(
64
);
#endif
#endif
/*
* Allocate global trace buffers.
*/
...
...
@@ -203,9 +195,6 @@ xfs_cleanup(void)
kmem_cache_destroy
(
xfs_ili_zone
);
kmem_cache_destroy
(
xfs_chashlist_zone
);
_ACL_ZONE_DESTROY
(
xfs_acl_zone
);
#if (defined(DEBUG) || defined(CONFIG_XFS_VNODE_TRACING))
ktrace_uninit
();
#endif
}
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment