diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/simd_x86.h | 8 | ||||
-rw-r--r-- | include/sys/trace_acl.h | 3 | ||||
-rw-r--r-- | include/sys/trace_arc.h | 15 | ||||
-rw-r--r-- | include/sys/trace_dbgmsg.h | 6 | ||||
-rw-r--r-- | include/sys/trace_dmu.h | 3 | ||||
-rw-r--r-- | include/sys/trace_dnode.h | 3 | ||||
-rw-r--r-- | include/sys/trace_multilist.h | 3 | ||||
-rw-r--r-- | include/sys/trace_txg.h | 3 | ||||
-rw-r--r-- | include/sys/trace_zil.h | 3 | ||||
-rw-r--r-- | include/sys/trace_zio.h | 2 | ||||
-rw-r--r-- | include/sys/trace_zrlock.h | 3 | ||||
-rw-r--r-- | include/sys/vdev_raidz.h | 22 | ||||
-rw-r--r-- | include/sys/vdev_raidz_impl.h | 30 | ||||
-rw-r--r-- | include/sys/zpl.h | 3 |
14 files changed, 61 insertions, 46 deletions
diff --git a/include/linux/simd_x86.h b/include/linux/simd_x86.h index 216dbed62..c9e3970c0 100644 --- a/include/linux/simd_x86.h +++ b/include/linux/simd_x86.h @@ -208,8 +208,8 @@ xgetbv(uint32_t index) uint32_t eax, edx; /* xgetbv - instruction byte code */ __asm__ __volatile__(".byte 0x0f; .byte 0x01; .byte 0xd0" - : "=a" (eax), "=d" (edx) - : "c" (index)); + : "=a" (eax), "=d" (edx) + : "c" (index)); return ((((uint64_t)edx)<<32) | (uint64_t)eax); } @@ -229,13 +229,13 @@ __cpuid_check_feature(const cpuid_feature_desc_t *desc) * are passed by value. */ __cpuid_count(desc->leaf, desc->subleaf, - r[EAX], r[EBX], r[ECX], r[EDX]); + r[EAX], r[EBX], r[ECX], r[EDX]); return ((r[desc->reg] & desc->flag) == desc->flag); } return (B_FALSE); } -#define CPUID_FEATURE_CHECK(name, id) \ +#define CPUID_FEATURE_CHECK(name, id) \ static inline boolean_t \ __cpuid_has_ ## name(void) \ { \ diff --git a/include/sys/trace_acl.h b/include/sys/trace_acl.h index a49e8b4c0..1d6e15c64 100644 --- a/include/sys/trace_acl.h +++ b/include/sys/trace_acl.h @@ -42,7 +42,7 @@ * zfs_ace_hdr_t *, ..., * uint32_t, ...); */ - +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_ace_class, TP_PROTO(znode_t *zn, zfs_ace_hdr_t *ace, uint32_t mask_matched), TP_ARGS(zn, ace, mask_matched), @@ -136,6 +136,7 @@ DECLARE_EVENT_CLASS(zfs_ace_class, __entry->z_type, __entry->z_flags, __entry->z_access_mask, __entry->mask_matched) ); +/* END CSTYLED */ #define DEFINE_ACE_EVENT(name) \ DEFINE_EVENT(zfs_ace_class, name, \ diff --git a/include/sys/trace_arc.h b/include/sys/trace_arc.h index 0384a44ab..9756bd458 100644 --- a/include/sys/trace_arc.h +++ b/include/sys/trace_arc.h @@ -42,7 +42,7 @@ * DTRACE_PROBE1(..., * arc_buf_hdr_t *, ...); */ - +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_arc_buf_hdr_class, TP_PROTO(arc_buf_hdr_t *ab), TP_ARGS(ab), @@ -95,6 +95,7 @@ DECLARE_EVENT_CLASS(zfs_arc_buf_hdr_class, __entry->hdr_mfu_ghost_hits, __entry->hdr_l2_hits, __entry->hdr_refcount) ); +/* END CSTYLED */ #define DEFINE_ARC_BUF_HDR_EVENT(name) \ DEFINE_EVENT(zfs_arc_buf_hdr_class, name, \ @@ -117,7 +118,7 @@ DEFINE_ARC_BUF_HDR_EVENT(zfs_l2arc__miss); * vdev_t *, ..., * zio_t *, ...); */ - +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_l2arc_rw_class, TP_PROTO(vdev_t *vd, zio_t *zio), TP_ARGS(vd, zio), @@ -137,6 +138,7 @@ DECLARE_EVENT_CLASS(zfs_l2arc_rw_class, ZIO_TP_PRINTK_FMT, __entry->vdev_id, __entry->vdev_guid, __entry->vdev_state, ZIO_TP_PRINTK_ARGS) ); +/* END CSTYLED */ #define DEFINE_L2ARC_RW_EVENT(name) \ DEFINE_EVENT(zfs_l2arc_rw_class, name, \ @@ -153,7 +155,7 @@ DEFINE_L2ARC_RW_EVENT(zfs_l2arc__write); * zio_t *, ..., * l2arc_write_callback_t *, ...); */ - +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_l2arc_iodone_class, TP_PROTO(zio_t *zio, l2arc_write_callback_t *cb), TP_ARGS(zio, cb), @@ -161,6 +163,7 @@ DECLARE_EVENT_CLASS(zfs_l2arc_iodone_class, TP_fast_assign(ZIO_TP_FAST_ASSIGN), TP_printk(ZIO_TP_PRINTK_FMT, ZIO_TP_PRINTK_ARGS) ); +/* END CSTYLED */ #define DEFINE_L2ARC_IODONE_EVENT(name) \ DEFINE_EVENT(zfs_l2arc_iodone_class, name, \ @@ -178,7 +181,7 @@ DEFINE_L2ARC_IODONE_EVENT(zfs_l2arc__iodone); * uint64_t, * const zbookmark_phys_t *); */ - +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_arc_miss_class, TP_PROTO(arc_buf_hdr_t *hdr, const blkptr_t *bp, uint64_t size, const zbookmark_phys_t *zb), @@ -272,6 +275,7 @@ DECLARE_EVENT_CLASS(zfs_arc_miss_class, __entry->bp_lsize, __entry->zb_objset, __entry->zb_object, __entry->zb_level, __entry->zb_blkid) ); +/* END CSTYLED */ #define DEFINE_ARC_MISS_EVENT(name) \ DEFINE_EVENT(zfs_arc_miss_class, name, \ @@ -289,7 +293,7 @@ DEFINE_ARC_MISS_EVENT(zfs_arc__miss); * uint64_t, ..., * boolean_t, ...); */ - +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_l2arc_evict_class, TP_PROTO(l2arc_dev_t *dev, list_t *buflist, uint64_t taddr, boolean_t all), @@ -330,6 +334,7 @@ DECLARE_EVENT_CLASS(zfs_l2arc_evict_class, __entry->l2ad_end, __entry->l2ad_first, __entry->l2ad_writing, __entry->taddr, __entry->all) ); +/* END CSTYLED */ #define DEFINE_L2ARC_EVICT_EVENT(name) \ DEFINE_EVENT(zfs_l2arc_evict_class, name, \ diff --git a/include/sys/trace_dbgmsg.h b/include/sys/trace_dbgmsg.h index 22f7fd986..e5b79f2ff 100644 --- a/include/sys/trace_dbgmsg.h +++ b/include/sys/trace_dbgmsg.h @@ -45,7 +45,7 @@ * int, ..., * const char *, ...); */ - +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_dprintf_class, TP_PROTO(const char *file, const char *function, int line, const char *msg), @@ -66,6 +66,7 @@ DECLARE_EVENT_CLASS(zfs_dprintf_class, TP_printk("%s:%d:%s(): %s", __get_str(file), __entry->line, __get_str(function), __get_str(msg)) ); +/* END CSTYLED */ #define DEFINE_DPRINTF_EVENT(name) \ DEFINE_EVENT(zfs_dprintf_class, name, \ @@ -83,7 +84,7 @@ DEFINE_DPRINTF_EVENT(zfs_zfs__dprintf); * int, ..., * uintptr_t, ...); */ - +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_set_error_class, TP_PROTO(const char *file, const char *function, int line, uintptr_t error), @@ -104,6 +105,7 @@ DECLARE_EVENT_CLASS(zfs_set_error_class, TP_printk("%s:%d:%s(): error 0x%lx", __get_str(file), __entry->line, __get_str(function), __entry->error) ); +/* END CSTYLED */ #ifdef TP_CONDITION #define DEFINE_SET_ERROR_EVENT(name) \ diff --git a/include/sys/trace_dmu.h b/include/sys/trace_dmu.h index e070997bc..0f2f49921 100644 --- a/include/sys/trace_dmu.h +++ b/include/sys/trace_dmu.h @@ -41,7 +41,7 @@ * uint64_t, ..., * uint64_t, ...); */ - +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_delay_mintime_class, TP_PROTO(dmu_tx_t *tx, uint64_t dirty, uint64_t min_tx_time), TP_ARGS(tx, dirty, min_tx_time), @@ -102,6 +102,7 @@ DECLARE_EVENT_CLASS(zfs_delay_mintime_class, #endif __entry->dirty, __entry->min_tx_time) ); +/* END CSTYLED */ #define DEFINE_DELAY_MINTIME_EVENT(name) \ DEFINE_EVENT(zfs_delay_mintime_class, name, \ diff --git a/include/sys/trace_dnode.h b/include/sys/trace_dnode.h index ee63c29cd..292f8e2b7 100644 --- a/include/sys/trace_dnode.h +++ b/include/sys/trace_dnode.h @@ -41,7 +41,7 @@ * int64_t, ..., * uint32_t, ...); */ - +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_dnode_move_class, TP_PROTO(dnode_t *dn, int64_t refcount, uint32_t dbufs), TP_ARGS(dn, refcount, dbufs), @@ -102,6 +102,7 @@ DECLARE_EVENT_CLASS(zfs_dnode_move_class, __entry->dn_maxblkid, __entry->dn_tx_holds, __entry->dn_holds, __entry->dn_have_spill, __entry->refcount, __entry->dbufs) ); +/* END CSTYLED */ #define DEFINE_DNODE_MOVE_EVENT(name) \ DEFINE_EVENT(zfs_dnode_move_class, name, \ diff --git a/include/sys/trace_multilist.h b/include/sys/trace_multilist.h index 08e27a911..816ba5b0a 100644 --- a/include/sys/trace_multilist.h +++ b/include/sys/trace_multilist.h @@ -41,7 +41,7 @@ * unsigned int, ..., * void *, ...); */ - +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_multilist_insert_remove_class, TP_PROTO(multilist_t *ml, unsigned sublist_idx, void *obj), TP_ARGS(ml, sublist_idx, obj), @@ -60,6 +60,7 @@ DECLARE_EVENT_CLASS(zfs_multilist_insert_remove_class, TP_printk("ml { offset %ld numsublists %llu sublistidx %u } ", __entry->ml_offset, __entry->ml_num_sublists, __entry->sublist_idx) ); +/* END CSTYLED */ #define DEFINE_MULTILIST_INSERT_REMOVE_EVENT(name) \ DEFINE_EVENT(zfs_multilist_insert_remove_class, name, \ diff --git a/include/sys/trace_txg.h b/include/sys/trace_txg.h index 61d650984..a408761f9 100644 --- a/include/sys/trace_txg.h +++ b/include/sys/trace_txg.h @@ -40,7 +40,7 @@ * dsl_pool_t *, ..., * uint64_t, ...); */ - +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_txg_class, TP_PROTO(dsl_pool_t *dp, uint64_t txg), TP_ARGS(dp, txg), @@ -52,6 +52,7 @@ DECLARE_EVENT_CLASS(zfs_txg_class, ), TP_printk("txg %llu", __entry->txg) ); +/* END CSTYLED */ #define DEFINE_TXG_EVENT(name) \ DEFINE_EVENT(zfs_txg_class, name, \ diff --git a/include/sys/trace_zil.h b/include/sys/trace_zil.h index e97466fde..389037c21 100644 --- a/include/sys/trace_zil.h +++ b/include/sys/trace_zil.h @@ -39,7 +39,7 @@ * DTRACE_PROBE1(..., * zilog_t *, ...); */ - +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_zil_class, TP_PROTO(zilog_t *zilog), TP_ARGS(zilog), @@ -111,6 +111,7 @@ DECLARE_EVENT_CLASS(zfs_zil_class, __entry->zl_itx_list_sz, __entry->zl_cur_used, __entry->zl_replay_time, __entry->zl_replay_blks) ); +/* END CSTYLED */ #define DEFINE_ZIL_EVENT(name) \ DEFINE_EVENT(zfs_zil_class, name, \ diff --git a/include/sys/trace_zio.h b/include/sys/trace_zio.h index 6db6cefe2..af589b9df 100644 --- a/include/sys/trace_zio.h +++ b/include/sys/trace_zio.h @@ -36,6 +36,7 @@ #include <sys/types.h> #include <sys/trace_common.h> /* For ZIO macros */ +/* BEGIN CSTYLED */ TRACE_EVENT(zfs_zio__delay__miss, TP_PROTO(zio_t *zio, hrtime_t now), TP_ARGS(zio, now), @@ -75,6 +76,7 @@ TRACE_EVENT(zfs_zio__delay__skip, TP_fast_assign(ZIO_TP_FAST_ASSIGN), TP_printk(ZIO_TP_PRINTK_FMT, ZIO_TP_PRINTK_ARGS) ); +/* END CSTYLED */ #endif /* _TRACE_ZIO_H */ diff --git a/include/sys/trace_zrlock.h b/include/sys/trace_zrlock.h index 356a86a6b..eacba759d 100644 --- a/include/sys/trace_zrlock.h +++ b/include/sys/trace_zrlock.h @@ -40,7 +40,7 @@ * zrlock_t *, ..., * uint32_t, ...); */ - +/* BEGIN CSTYLED */ DECLARE_EVENT_CLASS(zfs_zrlock_class, TP_PROTO(zrlock_t *zrl, uint32_t n), TP_ARGS(zrl, n), @@ -69,6 +69,7 @@ DECLARE_EVENT_CLASS(zfs_zrlock_class, __entry->refcount, __entry->n) #endif ); +/* END_CSTYLED */ #define DEFINE_ZRLOCK_EVENT(name) \ DEFINE_EVENT(zfs_zrlock_class, name, \ diff --git a/include/sys/vdev_raidz.h b/include/sys/vdev_raidz.h index 06e21af41..2ce32469d 100644 --- a/include/sys/vdev_raidz.h +++ b/include/sys/vdev_raidz.h @@ -40,22 +40,22 @@ struct kernel_param {}; /* * vdev_raidz interface */ -struct raidz_map * vdev_raidz_map_alloc(struct zio *, uint64_t, uint64_t, +struct raidz_map *vdev_raidz_map_alloc(struct zio *, uint64_t, uint64_t, uint64_t); -void vdev_raidz_map_free(struct raidz_map *); -void vdev_raidz_generate_parity(struct raidz_map *); -int vdev_raidz_reconstruct(struct raidz_map *, const int *, int); +void vdev_raidz_map_free(struct raidz_map *); +void vdev_raidz_generate_parity(struct raidz_map *); +int vdev_raidz_reconstruct(struct raidz_map *, const int *, int); /* * vdev_raidz_math interface */ -void vdev_raidz_math_init(void); -void vdev_raidz_math_fini(void); -struct raidz_impl_ops * vdev_raidz_math_get_ops(void); -int vdev_raidz_math_generate(struct raidz_map *); -int vdev_raidz_math_reconstruct(struct raidz_map *, - const int *, const int *, const int); -int vdev_raidz_impl_set(const char *); +void vdev_raidz_math_init(void); +void vdev_raidz_math_fini(void); +struct raidz_impl_ops *vdev_raidz_math_get_ops(void); +int vdev_raidz_math_generate(struct raidz_map *); +int vdev_raidz_math_reconstruct(struct raidz_map *, const int *, const int *, + const int); +int vdev_raidz_impl_set(const char *); #ifdef __cplusplus } diff --git a/include/sys/vdev_raidz_impl.h b/include/sys/vdev_raidz_impl.h index b4663b97c..4bd15e3d5 100644 --- a/include/sys/vdev_raidz_impl.h +++ b/include/sys/vdev_raidz_impl.h @@ -178,12 +178,12 @@ extern const raidz_impl_ops_t vdev_raidz_aarch64_neonx2_impl; * @code parity the function produce * @impl name of the implementation */ -#define _RAIDZ_GEN_WRAP(code, impl) \ +#define _RAIDZ_GEN_WRAP(code, impl) \ static void \ impl ## _gen_ ## code(void *rmp) \ { \ - raidz_map_t *rm = (raidz_map_t *) rmp; \ - raidz_generate_## code ## _impl(rm); \ + raidz_map_t *rm = (raidz_map_t *)rmp; \ + raidz_generate_## code ## _impl(rm); \ } /* @@ -192,11 +192,11 @@ impl ## _gen_ ## code(void *rmp) \ * @code parity the function produce * @impl name of the implementation */ -#define _RAIDZ_REC_WRAP(code, impl) \ -static int \ +#define _RAIDZ_REC_WRAP(code, impl) \ +static int \ impl ## _rec_ ## code(void *rmp, const int *tgtidx) \ { \ - raidz_map_t *rm = (raidz_map_t *) rmp; \ + raidz_map_t *rm = (raidz_map_t *)rmp; \ return (raidz_reconstruct_## code ## _impl(rm, tgtidx)); \ } @@ -295,7 +295,7 @@ vdev_raidz_exp2(const uint8_t a, const unsigned exp) if (a == 0) return (0); - return (vdev_raidz_pow2[(exp + (unsigned) vdev_raidz_log2[a]) % 255]); + return (vdev_raidz_pow2[(exp + (unsigned)vdev_raidz_log2[a]) % 255]); } /* @@ -318,9 +318,9 @@ gf_mul(const gf_t a, const gf_t b) if (a == 0 || b == 0) return (0); - logsum = (gf_log_t) vdev_raidz_log2[a] + (gf_log_t) vdev_raidz_log2[b]; + logsum = (gf_log_t)vdev_raidz_log2[a] + (gf_log_t)vdev_raidz_log2[b]; - return ((gf_t) vdev_raidz_pow2[logsum % 255]); + return ((gf_t)vdev_raidz_pow2[logsum % 255]); } static inline gf_t @@ -332,10 +332,10 @@ gf_div(const gf_t a, const gf_t b) if (a == 0) return (0); - logsum = (gf_log_t) 255 + (gf_log_t) vdev_raidz_log2[a] - - (gf_log_t) vdev_raidz_log2[b]; + logsum = (gf_log_t)255 + (gf_log_t)vdev_raidz_log2[a] - + (gf_log_t)vdev_raidz_log2[b]; - return ((gf_t) vdev_raidz_pow2[logsum % 255]); + return ((gf_t)vdev_raidz_pow2[logsum % 255]); } static inline gf_t @@ -345,9 +345,9 @@ gf_inv(const gf_t a) ASSERT3U(a, >, 0); - logsum = (gf_log_t) 255 - (gf_log_t) vdev_raidz_log2[a]; + logsum = (gf_log_t)255 - (gf_log_t)vdev_raidz_log2[a]; - return ((gf_t) vdev_raidz_pow2[logsum]); + return ((gf_t)vdev_raidz_pow2[logsum]); } static inline gf_t @@ -360,7 +360,7 @@ static inline gf_t gf_exp4(gf_log_t exp) { ASSERT3U(exp, <=, 255); - return ((gf_t) vdev_raidz_pow2[(2 * exp) % 255]); + return ((gf_t)vdev_raidz_pow2[(2 * exp) % 255]); } #ifdef __cplusplus diff --git a/include/sys/zpl.h b/include/sys/zpl.h index 174d40efa..1f97f2511 100644 --- a/include/sys/zpl.h +++ b/include/sys/zpl.h @@ -148,8 +148,7 @@ static inline bool dir_emit(struct dir_context *ctx, const char *name, int namelen, uint64_t ino, unsigned type) { - return (ctx->actor(ctx->dirent, name, namelen, ctx->pos, ino, type) - == 0); + return (!ctx->actor(ctx->dirent, name, namelen, ctx->pos, ino, type)); } static inline bool |