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
a270f1d0
Commit
a270f1d0
authored
Jan 09, 2004
by
Nathan Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Enable tracing in the quota code if requested
SGI Modid: 2.5.x-xfs:slinx:160242a
parent
bafd0069
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
24 deletions
+33
-24
fs/xfs/Makefile
fs/xfs/Makefile
+1
-0
fs/xfs/quota/xfs_dquot.c
fs/xfs/quota/xfs_dquot.c
+24
-18
fs/xfs/quota/xfs_dquot.h
fs/xfs/quota/xfs_dquot.h
+8
-6
No files found.
fs/xfs/Makefile
View file @
a270f1d0
...
@@ -37,6 +37,7 @@ ifeq ($(CONFIG_XFS_DEBUG),y)
...
@@ -37,6 +37,7 @@ ifeq ($(CONFIG_XFS_DEBUG),y)
endif
endif
ifeq
($(CONFIG_XFS_TRACE),y)
ifeq
($(CONFIG_XFS_TRACE),y)
EXTRA_CFLAGS
+=
-DPAGEBUF_TRACE
EXTRA_CFLAGS
+=
-DPAGEBUF_TRACE
EXTRA_CFLAGS
+=
-DXFS_DQUOT_TRACE
endif
endif
obj-$(CONFIG_XFS_FS)
+=
xfs.o
obj-$(CONFIG_XFS_FS)
+=
xfs.o
...
...
fs/xfs/quota/xfs_dquot.c
View file @
a270f1d0
...
@@ -124,7 +124,7 @@ xfs_qm_dqinit(
...
@@ -124,7 +124,7 @@ xfs_qm_dqinit(
initnsema
(
&
dqp
->
q_flock
,
1
,
"fdq"
);
initnsema
(
&
dqp
->
q_flock
,
1
,
"fdq"
);
sv_init
(
&
dqp
->
q_pinwait
,
SV_DEFAULT
,
"pdq"
);
sv_init
(
&
dqp
->
q_pinwait
,
SV_DEFAULT
,
"pdq"
);
#ifdef
DQUOT_TRACING
#ifdef
XFS_DQUOT_TRACE
dqp
->
q_trace
=
ktrace_alloc
(
DQUOT_TRACE_SIZE
,
KM_SLEEP
);
dqp
->
q_trace
=
ktrace_alloc
(
DQUOT_TRACE_SIZE
,
KM_SLEEP
);
xfs_dqtrace_entry
(
dqp
,
"DQINIT"
);
xfs_dqtrace_entry
(
dqp
,
"DQINIT"
);
#endif
#endif
...
@@ -148,7 +148,7 @@ xfs_qm_dqinit(
...
@@ -148,7 +148,7 @@ xfs_qm_dqinit(
dqp
->
q_hash
=
0
;
dqp
->
q_hash
=
0
;
ASSERT
(
dqp
->
dq_flnext
==
dqp
->
dq_flprev
);
ASSERT
(
dqp
->
dq_flnext
==
dqp
->
dq_flprev
);
#ifdef
DQUOT_TRACING
#ifdef
XFS_DQUOT_TRACE
ASSERT
(
dqp
->
q_trace
);
ASSERT
(
dqp
->
q_trace
);
xfs_dqtrace_entry
(
dqp
,
"DQRECLAIMED_INIT"
);
xfs_dqtrace_entry
(
dqp
,
"DQRECLAIMED_INIT"
);
#endif
#endif
...
@@ -173,7 +173,7 @@ xfs_qm_dqdestroy(
...
@@ -173,7 +173,7 @@ xfs_qm_dqdestroy(
freesema
(
&
dqp
->
q_flock
);
freesema
(
&
dqp
->
q_flock
);
sv_destroy
(
&
dqp
->
q_pinwait
);
sv_destroy
(
&
dqp
->
q_pinwait
);
#ifdef
DQUOT_TRACING
#ifdef
XFS_DQUOT_TRACE
if
(
dqp
->
q_trace
)
if
(
dqp
->
q_trace
)
ktrace_free
(
dqp
->
q_trace
);
ktrace_free
(
dqp
->
q_trace
);
dqp
->
q_trace
=
NULL
;
dqp
->
q_trace
=
NULL
;
...
@@ -201,20 +201,20 @@ xfs_qm_dqinit_core(
...
@@ -201,20 +201,20 @@ xfs_qm_dqinit_core(
}
}
#ifdef
DQUOT_TRACING
#ifdef
XFS_DQUOT_TRACE
/*
/*
* Dquot tracing for debugging.
* Dquot tracing for debugging.
*/
*/
/* ARGSUSED */
/* ARGSUSED */
void
void
xfs_dqtrace_entry__
(
__xfs_dqtrace_entry
(
xfs_dquot_t
*
dqp
,
xfs_dquot_t
*
dqp
,
char
*
func
,
char
*
func
,
void
*
retaddr
,
void
*
retaddr
,
xfs_inode_t
*
ip
)
xfs_inode_t
*
ip
)
{
{
xfs_dquot_t
*
udqp
=
NULL
;
xfs_dquot_t
*
udqp
=
NULL
;
int
ino
;
xfs_ino_t
ino
=
0
;
ASSERT
(
dqp
->
q_trace
);
ASSERT
(
dqp
->
q_trace
);
if
(
ip
)
{
if
(
ip
)
{
...
@@ -227,13 +227,19 @@ xfs_dqtrace_entry__(
...
@@ -227,13 +227,19 @@ xfs_dqtrace_entry__(
(
void
*
)(
__psint_t
)
dqp
->
q_nrefs
,
(
void
*
)(
__psint_t
)
dqp
->
q_nrefs
,
(
void
*
)(
__psint_t
)
dqp
->
dq_flags
,
(
void
*
)(
__psint_t
)
dqp
->
dq_flags
,
(
void
*
)(
__psint_t
)
dqp
->
q_res_bcount
,
(
void
*
)(
__psint_t
)
dqp
->
q_res_bcount
,
(
void
*
)(
__psint_t
)
INT_GET
(
dqp
->
q_core
.
d_bcount
,
ARCH_CONVERT
),
(
void
*
)(
__psint_t
)
INT_GET
(
dqp
->
q_core
.
d_bcount
,
(
void
*
)(
__psint_t
)
INT_GET
(
dqp
->
q_core
.
d_icount
,
ARCH_CONVERT
),
ARCH_CONVERT
),
(
void
*
)(
__psint_t
)
INT_GET
(
dqp
->
q_core
.
d_blk_hardlimit
,
ARCH_CONVERT
),
(
void
*
)(
__psint_t
)
INT_GET
(
dqp
->
q_core
.
d_icount
,
(
void
*
)(
__psint_t
)
INT_GET
(
dqp
->
q_core
.
d_blk_softlimit
,
ARCH_CONVERT
),
ARCH_CONVERT
),
(
void
*
)(
__psint_t
)
INT_GET
(
dqp
->
q_core
.
d_ino_hardlimit
,
ARCH_CONVERT
),
(
void
*
)(
__psint_t
)
INT_GET
(
dqp
->
q_core
.
d_blk_hardlimit
,
(
void
*
)(
__psint_t
)
INT_GET
(
dqp
->
q_core
.
d_ino_softlimit
,
ARCH_CONVERT
),
ARCH_CONVERT
),
(
void
*
)(
__psint_t
)
INT_GET
(
dqp
->
q_core
.
d_id
,
ARCH_CONVERT
),
/* 11 */
(
void
*
)(
__psint_t
)
INT_GET
(
dqp
->
q_core
.
d_blk_softlimit
,
ARCH_CONVERT
),
(
void
*
)(
__psint_t
)
INT_GET
(
dqp
->
q_core
.
d_ino_hardlimit
,
ARCH_CONVERT
),
(
void
*
)(
__psint_t
)
INT_GET
(
dqp
->
q_core
.
d_ino_softlimit
,
ARCH_CONVERT
),
(
void
*
)(
__psint_t
)
INT_GET
(
dqp
->
q_core
.
d_id
,
ARCH_CONVERT
),
(
void
*
)(
__psint_t
)
current_pid
(),
(
void
*
)(
__psint_t
)
current_pid
(),
(
void
*
)(
__psint_t
)
ino
,
(
void
*
)(
__psint_t
)
ino
,
(
void
*
)(
__psint_t
)
retaddr
,
(
void
*
)(
__psint_t
)
retaddr
,
...
...
fs/xfs/quota/xfs_dquot.h
View file @
a270f1d0
...
@@ -99,7 +99,7 @@ typedef struct xfs_dquot {
...
@@ -99,7 +99,7 @@ typedef struct xfs_dquot {
sema_t
q_flock
;
/* flush lock */
sema_t
q_flock
;
/* flush lock */
uint
q_pincount
;
/* pin count for this dquot */
uint
q_pincount
;
/* pin count for this dquot */
sv_t
q_pinwait
;
/* sync var for pinning */
sv_t
q_pinwait
;
/* sync var for pinning */
#ifdef
DQUOT_TRACING
#ifdef
XFS_DQUOT_TRACE
struct
ktrace
*
q_trace
;
/* trace header structure */
struct
ktrace
*
q_trace
;
/* trace header structure */
#endif
#endif
}
xfs_dquot_t
;
}
xfs_dquot_t
;
...
@@ -175,23 +175,25 @@ XFS_DQ_IS_LOCKED(xfs_dquot_t *dqp)
...
@@ -175,23 +175,25 @@ XFS_DQ_IS_LOCKED(xfs_dquot_t *dqp)
#define XFS_IS_THIS_QUOTA_OFF(d) (! (XFS_QM_ISUDQ(d) ? \
#define XFS_IS_THIS_QUOTA_OFF(d) (! (XFS_QM_ISUDQ(d) ? \
(XFS_IS_UQUOTA_ON((d)->q_mount)) : \
(XFS_IS_UQUOTA_ON((d)->q_mount)) : \
(XFS_IS_GQUOTA_ON((d)->q_mount))))
(XFS_IS_GQUOTA_ON((d)->q_mount))))
#ifdef DQUOT_TRACING
#ifdef XFS_DQUOT_TRACE
/*
/*
* Dquot Tracing stuff.
* Dquot Tracing stuff.
*/
*/
#define DQUOT_TRACE_SIZE 64
#define DQUOT_TRACE_SIZE 64
#define DQUOT_KTRACE_ENTRY 1
#define DQUOT_KTRACE_ENTRY 1
extern
void
__xfs_dqtrace_entry
(
xfs_dquot_t
*
dqp
,
char
*
func
,
void
*
,
xfs_inode_t
*
);
#define xfs_dqtrace_entry_ino(a,b,ip) \
#define xfs_dqtrace_entry_ino(a,b,ip) \
xfs_dqtrace_entry__
((a), (b), (void*)__return_address, (ip))
__xfs_dqtrace_entry
((a), (b), (void*)__return_address, (ip))
#define xfs_dqtrace_entry(a,b) \
#define xfs_dqtrace_entry(a,b) \
xfs_dqtrace_entry__((a), (b), (void*)__return_address, NULL)
__xfs_dqtrace_entry((a), (b), (void*)__return_address, NULL)
extern
void
xfs_dqtrace_entry__
(
xfs_dquot_t
*
dqp
,
char
*
func
,
void
*
,
xfs_inode_t
*
);
#else
#else
#define xfs_dqtrace_entry(a,b)
#define xfs_dqtrace_entry(a,b)
#define xfs_dqtrace_entry_ino(a,b,ip)
#define xfs_dqtrace_entry_ino(a,b,ip)
#endif
#endif
#ifdef QUOTADEBUG
#ifdef QUOTADEBUG
extern
void
xfs_qm_dqprint
(
xfs_dquot_t
*
);
extern
void
xfs_qm_dqprint
(
xfs_dquot_t
*
);
#else
#else
...
...
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