diff options
author | George Melikov <[email protected]> | 2017-01-21 00:17:55 +0300 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-01-22 13:25:40 -0800 |
commit | 4ea3f86426f76e59244ec6f66504da688d90193c (patch) | |
tree | ff907fb2ce89e00b8b89a0a653c9b4e7005f6935 /include | |
parent | ec441a9c534815b379468a2d349011cbd5bcd884 (diff) |
codebase style improvements for OpenZFS 6459 port
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/vfs_compat.h | 12 | ||||
-rw-r--r-- | include/sys/trace_acl.h | 2 | ||||
-rw-r--r-- | include/sys/trace_arc.h | 10 | ||||
-rw-r--r-- | include/sys/trace_dbgmsg.h | 6 | ||||
-rw-r--r-- | include/sys/trace_dbuf.h | 8 | ||||
-rw-r--r-- | include/sys/trace_dmu.h | 2 | ||||
-rw-r--r-- | include/sys/trace_dnode.h | 2 | ||||
-rw-r--r-- | include/sys/trace_multilist.h | 2 | ||||
-rw-r--r-- | include/sys/trace_txg.h | 2 | ||||
-rw-r--r-- | include/sys/trace_zil.h | 2 |
10 files changed, 44 insertions, 4 deletions
diff --git a/include/linux/vfs_compat.h b/include/linux/vfs_compat.h index 7a1cb967b..baa298018 100644 --- a/include/linux/vfs_compat.h +++ b/include/linux/vfs_compat.h @@ -225,7 +225,8 @@ zpl_posix_acl_release(struct posix_acl *acl) #define zpl_forget_cached_acl(ip, ty) forget_cached_acl(ip, ty) #else static inline void -zpl_set_cached_acl(struct inode *ip, int type, struct posix_acl *newer) { +zpl_set_cached_acl(struct inode *ip, int type, struct posix_acl *newer) +{ struct posix_acl *older = NULL; spin_lock(&ip->i_lock); @@ -250,7 +251,8 @@ zpl_set_cached_acl(struct inode *ip, int type, struct posix_acl *newer) { } static inline void -zpl_forget_cached_acl(struct inode *ip, int type) { +zpl_forget_cached_acl(struct inode *ip, int type) +{ zpl_set_cached_acl(ip, type, (struct posix_acl *)ACL_NOT_CACHED); } #endif /* HAVE_SET_CACHED_ACL_USABLE */ @@ -261,7 +263,8 @@ zpl_forget_cached_acl(struct inode *ip, int type) { #define __posix_acl_create(acl, gfp, mode) posix_acl_create(acl, gfp, mode) #else static inline int -__posix_acl_chmod(struct posix_acl **acl, int flags, umode_t umode) { +__posix_acl_chmod(struct posix_acl **acl, int flags, umode_t umode) +{ struct posix_acl *oldacl = *acl; mode_t mode = umode; int error; @@ -282,7 +285,8 @@ __posix_acl_chmod(struct posix_acl **acl, int flags, umode_t umode) { } static inline int -__posix_acl_create(struct posix_acl **acl, int flags, umode_t *umodep) { +__posix_acl_create(struct posix_acl **acl, int flags, umode_t *umodep) +{ struct posix_acl *oldacl = *acl; mode_t mode = *umodep; int error; diff --git a/include/sys/trace_acl.h b/include/sys/trace_acl.h index 1d6e15c64..80c63f743 100644 --- a/include/sys/trace_acl.h +++ b/include/sys/trace_acl.h @@ -139,9 +139,11 @@ DECLARE_EVENT_CLASS(zfs_ace_class, /* END CSTYLED */ #define DEFINE_ACE_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT(zfs_ace_class, name, \ TP_PROTO(znode_t *zn, zfs_ace_hdr_t *ace, uint32_t mask_matched), \ TP_ARGS(zn, ace, mask_matched)) +/* END CSTYLED */ DEFINE_ACE_EVENT(zfs_zfs__ace__denies); DEFINE_ACE_EVENT(zfs_zfs__ace__allows); diff --git a/include/sys/trace_arc.h b/include/sys/trace_arc.h index 9756bd458..b4edb5142 100644 --- a/include/sys/trace_arc.h +++ b/include/sys/trace_arc.h @@ -98,9 +98,11 @@ DECLARE_EVENT_CLASS(zfs_arc_buf_hdr_class, /* END CSTYLED */ #define DEFINE_ARC_BUF_HDR_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT(zfs_arc_buf_hdr_class, name, \ TP_PROTO(arc_buf_hdr_t *ab), \ TP_ARGS(ab)) +/* END CSTYLED */ DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__hit); DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__evict); DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__delete); @@ -141,9 +143,11 @@ DECLARE_EVENT_CLASS(zfs_l2arc_rw_class, /* END CSTYLED */ #define DEFINE_L2ARC_RW_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT(zfs_l2arc_rw_class, name, \ TP_PROTO(vdev_t *vd, zio_t *zio), \ TP_ARGS(vd, zio)) +/* END CSTYLED */ DEFINE_L2ARC_RW_EVENT(zfs_l2arc__read); DEFINE_L2ARC_RW_EVENT(zfs_l2arc__write); @@ -166,9 +170,11 @@ DECLARE_EVENT_CLASS(zfs_l2arc_iodone_class, /* END CSTYLED */ #define DEFINE_L2ARC_IODONE_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT(zfs_l2arc_iodone_class, name, \ TP_PROTO(zio_t *zio, l2arc_write_callback_t *cb), \ TP_ARGS(zio, cb)) +/* END CSTYLED */ DEFINE_L2ARC_IODONE_EVENT(zfs_l2arc__iodone); @@ -278,10 +284,12 @@ DECLARE_EVENT_CLASS(zfs_arc_miss_class, /* END CSTYLED */ #define DEFINE_ARC_MISS_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT(zfs_arc_miss_class, name, \ TP_PROTO(arc_buf_hdr_t *hdr, \ const blkptr_t *bp, uint64_t size, const zbookmark_phys_t *zb), \ TP_ARGS(hdr, bp, size, zb)) +/* END CSTYLED */ DEFINE_ARC_MISS_EVENT(zfs_arc__miss); /* @@ -337,10 +345,12 @@ DECLARE_EVENT_CLASS(zfs_l2arc_evict_class, /* END CSTYLED */ #define DEFINE_L2ARC_EVICT_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT(zfs_l2arc_evict_class, name, \ TP_PROTO(l2arc_dev_t *dev, \ list_t *buflist, uint64_t taddr, boolean_t all), \ TP_ARGS(dev, buflist, taddr, all)) +/* END CSTYLED */ DEFINE_L2ARC_EVICT_EVENT(zfs_l2arc__evict); #endif /* _TRACE_ARC_H */ diff --git a/include/sys/trace_dbgmsg.h b/include/sys/trace_dbgmsg.h index e5b79f2ff..27abe703f 100644 --- a/include/sys/trace_dbgmsg.h +++ b/include/sys/trace_dbgmsg.h @@ -69,10 +69,12 @@ DECLARE_EVENT_CLASS(zfs_dprintf_class, /* END CSTYLED */ #define DEFINE_DPRINTF_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT(zfs_dprintf_class, name, \ TP_PROTO(const char *file, const char *function, int line, \ const char *msg), \ TP_ARGS(file, function, line, msg)) +/* END CSTYLED */ DEFINE_DPRINTF_EVENT(zfs_zfs__dprintf); /* @@ -109,16 +111,20 @@ DECLARE_EVENT_CLASS(zfs_set_error_class, #ifdef TP_CONDITION #define DEFINE_SET_ERROR_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT_CONDITION(zfs_set_error_class, name, \ TP_PROTO(const char *file, const char *function, int line, \ uintptr_t error), \ TP_ARGS(file, function, line, error), \ TP_CONDITION(error)) +/* END CSTYLED */ #else #define DEFINE_SET_ERROR_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT(zfs_set_error_class, name, \ TP_PROTO(const char *file, const char *function, int line, \ uintptr_t error), \ TP_ARGS(file, function, line, error)) +/* END CSTYLED */ #endif DEFINE_SET_ERROR_EVENT(zfs_set__error); diff --git a/include/sys/trace_dbuf.h b/include/sys/trace_dbuf.h index 76274d152..4c5e51ebe 100644 --- a/include/sys/trace_dbuf.h +++ b/include/sys/trace_dbuf.h @@ -78,6 +78,7 @@ __entry->db_blkid, __entry->db_offset, \ __entry->db_size, __entry->db_state, __entry->db_holds +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_dbuf_class, TP_PROTO(dmu_buf_impl_t *db, zio_t *zio), TP_ARGS(db, zio), @@ -85,13 +86,17 @@ DECLARE_EVENT_CLASS(zfs_dbuf_class, TP_fast_assign(DBUF_TP_FAST_ASSIGN), TP_printk(DBUF_TP_PRINTK_FMT, DBUF_TP_PRINTK_ARGS) ); +/* END CSTYLED */ #define DEFINE_DBUF_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT(zfs_dbuf_class, name, \ TP_PROTO(dmu_buf_impl_t *db, zio_t *zio), \ TP_ARGS(db, zio)) +/* END CSTYLED */ DEFINE_DBUF_EVENT(zfs_blocked__read); +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_dbuf_evict_one_class, TP_PROTO(dmu_buf_impl_t *db, multilist_sublist_t *mls), TP_ARGS(db, mls), @@ -99,11 +104,14 @@ DECLARE_EVENT_CLASS(zfs_dbuf_evict_one_class, TP_fast_assign(DBUF_TP_FAST_ASSIGN), TP_printk(DBUF_TP_PRINTK_FMT, DBUF_TP_PRINTK_ARGS) ); +/* END CSTYLED */ #define DEFINE_DBUF_EVICT_ONE_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT(zfs_dbuf_evict_one_class, name, \ TP_PROTO(dmu_buf_impl_t *db, multilist_sublist_t *mls), \ TP_ARGS(db, mls)) +/* END CSTYLED */ DEFINE_DBUF_EVICT_ONE_EVENT(zfs_dbuf__evict__one); #endif /* _TRACE_DBUF_H */ diff --git a/include/sys/trace_dmu.h b/include/sys/trace_dmu.h index 0f2f49921..844746a9c 100644 --- a/include/sys/trace_dmu.h +++ b/include/sys/trace_dmu.h @@ -105,9 +105,11 @@ DECLARE_EVENT_CLASS(zfs_delay_mintime_class, /* END CSTYLED */ #define DEFINE_DELAY_MINTIME_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT(zfs_delay_mintime_class, name, \ TP_PROTO(dmu_tx_t *tx, uint64_t dirty, uint64_t min_tx_time), \ TP_ARGS(tx, dirty, min_tx_time)) +/* END CSTYLED */ DEFINE_DELAY_MINTIME_EVENT(zfs_delay__mintime); #endif /* _TRACE_DMU_H */ diff --git a/include/sys/trace_dnode.h b/include/sys/trace_dnode.h index 292f8e2b7..a651a56cf 100644 --- a/include/sys/trace_dnode.h +++ b/include/sys/trace_dnode.h @@ -105,9 +105,11 @@ DECLARE_EVENT_CLASS(zfs_dnode_move_class, /* END CSTYLED */ #define DEFINE_DNODE_MOVE_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT(zfs_dnode_move_class, name, \ TP_PROTO(dnode_t *dn, int64_t refcount, uint32_t dbufs), \ TP_ARGS(dn, refcount, dbufs)) +/* END CSTYLED */ DEFINE_DNODE_MOVE_EVENT(zfs_dnode__move); #endif /* _TRACE_DNODE_H */ diff --git a/include/sys/trace_multilist.h b/include/sys/trace_multilist.h index 816ba5b0a..7cf4dc39d 100644 --- a/include/sys/trace_multilist.h +++ b/include/sys/trace_multilist.h @@ -63,9 +63,11 @@ DECLARE_EVENT_CLASS(zfs_multilist_insert_remove_class, /* END CSTYLED */ #define DEFINE_MULTILIST_INSERT_REMOVE_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT(zfs_multilist_insert_remove_class, name, \ TP_PROTO(multilist_t *ml, unsigned int sublist_idx, void *obj), \ TP_ARGS(ml, sublist_idx, obj)) +/* END CSTYLED */ DEFINE_MULTILIST_INSERT_REMOVE_EVENT(zfs_multilist__insert); DEFINE_MULTILIST_INSERT_REMOVE_EVENT(zfs_multilist__remove); diff --git a/include/sys/trace_txg.h b/include/sys/trace_txg.h index a408761f9..6c414bfce 100644 --- a/include/sys/trace_txg.h +++ b/include/sys/trace_txg.h @@ -55,9 +55,11 @@ DECLARE_EVENT_CLASS(zfs_txg_class, /* END CSTYLED */ #define DEFINE_TXG_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT(zfs_txg_class, name, \ TP_PROTO(dsl_pool_t *dp, uint64_t txg), \ TP_ARGS(dp, txg)) +/* END CSTYLED */ DEFINE_TXG_EVENT(zfs_dsl_pool_sync__done); DEFINE_TXG_EVENT(zfs_txg__quiescing); DEFINE_TXG_EVENT(zfs_txg__opened); diff --git a/include/sys/trace_zil.h b/include/sys/trace_zil.h index 389037c21..fbceee643 100644 --- a/include/sys/trace_zil.h +++ b/include/sys/trace_zil.h @@ -114,11 +114,13 @@ DECLARE_EVENT_CLASS(zfs_zil_class, /* END CSTYLED */ #define DEFINE_ZIL_EVENT(name) \ +/* BEGIN CSTYLED */ DEFINE_EVENT(zfs_zil_class, name, \ TP_PROTO(zilog_t *zilog), \ TP_ARGS(zilog)) DEFINE_ZIL_EVENT(zfs_zil__cw1); DEFINE_ZIL_EVENT(zfs_zil__cw2); +/* END CSTYLED */ #endif /* _TRACE_ZIL_H */ |