Skip to content

Commit

Permalink
ext4: Fix include/trace/events/ext4.h to work with Systemtap
Browse files Browse the repository at this point in the history
Using relative pathnames in #include statements interacts badly with
SystemTap, since the fs/ext4/*.h header files are not packaged up as
part of a distribution kernel's header files.  Since systemtap doesn't
use TP_fast_assign(), we can use a blind structure definition and then
make sure the needed header files are defined before the ext4 source
files #include the trace/events/ext4.h header file.

https://bugzilla.redhat.com/show_bug.cgi?id=512478

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Theodore Ts'o committed Sep 15, 2009
1 parent 7ad9bb6 commit 3661d28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include "ext4_jbd2.h"
#include "xattr.h"
#include "acl.h"
#include "mballoc.h"

#define CREATE_TRACE_POINTS
#include <trace/events/ext4.h>
Expand Down
6 changes: 4 additions & 2 deletions include/trace/events/ext4.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
#define _TRACE_EXT4_H

#include <linux/writeback.h>
#include "../../../fs/ext4/ext4.h"
#include "../../../fs/ext4/mballoc.h"
#include <linux/tracepoint.h>

struct ext4_allocation_context;
struct ext4_allocation_request;
struct ext4_prealloc_space;

TRACE_EVENT(ext4_free_inode,
TP_PROTO(struct inode *inode),

Expand Down

0 comments on commit 3661d28

Please sign in to comment.