mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04:45 +03:00
Remove duplicate typedefs from trace.h
Older versions of GCC (e.g. GCC 4.4.7 on RHEL6) do not allow duplicate typedef declarations with the same type. The trace.h header contains some typedefs to avoid 'unknown type' errors for C files that haven't declared the type in question. But this causes build failures for C files that have already declared the type. Newer versions of GCC (e.g. v4.6) allow duplicate typedefs with the same type unless pedantic error checking is in force. To support the older versions we need to remove the duplicate typedefs. Removal of the typedefs means we can't built tracepoints code using those types unless the required headers have been included. To facilitate this, all tracepoint event declarations have been moved out of trace.h into separate headers. Each new header is explicitly included from the C file that uses the events defined therein. The trace.h header is still indirectly included form zfs_context.h and provides the implementation of the dprintf(), dbgmsg(), and SET_ERROR() interfaces. This makes those interfaces readily available throughout the code base. The macros that redefine DTRACE_PROBE* to use Linux tracepoints are also still provided by trace.h, so it is a prerequisite for the other trace_*.h headers. These new Linux implementation-specific headers do introduce a small divergence from upstream ZFS in several core C files, but this should not present a significant maintenance burden. Signed-off-by: Ned Bass <bass6@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #2953
This commit is contained in:
committed by
Brian Behlendorf
parent
74328ee18f
commit
49ee64e5e6
+1
-5
@@ -147,6 +147,7 @@
|
||||
#include <sys/dmu_tx.h>
|
||||
#include <zfs_fletcher.h>
|
||||
#include <sys/arc_impl.h>
|
||||
#include <sys/trace_arc.h>
|
||||
|
||||
#ifndef _KERNEL
|
||||
/* set with ZFS_DEBUG=watch, to enable watchpoints on frozen buffers */
|
||||
@@ -625,11 +626,6 @@ typedef struct l2arc_read_callback {
|
||||
enum zio_compress l2rcb_compress; /* applied compress */
|
||||
} l2arc_read_callback_t;
|
||||
|
||||
typedef struct l2arc_write_callback {
|
||||
l2arc_dev_t *l2wcb_dev; /* device info */
|
||||
arc_buf_hdr_t *l2wcb_head; /* head of write buflist */
|
||||
} l2arc_write_callback_t;
|
||||
|
||||
struct l2arc_buf_hdr {
|
||||
/* protected by arc_buf_hdr mutex */
|
||||
l2arc_dev_t *b_dev; /* L2ARC device */
|
||||
|
||||
Reference in New Issue
Block a user