mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 11:19:32 +03:00
Allow building with CFLAGS="-O0"
If compiled with -O0, gcc doesn't do any stack frame coalescing and -Wframe-larger-than=1024 is triggered in debug mode. Starting with gcc 4.8, new opt level -Og is introduced for debugging, which does not trigger this warning. Fix bench zio size, using SPA_OLD_MAXBLOCKSHIFT Signed-off-by: Gvozden Neskovic <neskovic@gmail.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #4799
This commit is contained in:
parent
5c27b29605
commit
590c9a0994
@ -271,7 +271,7 @@ init_raidz_kstat(raidz_impl_kstat_t *rs, const char *name)
|
|||||||
|
|
||||||
#define BENCH_D_COLS (8ULL)
|
#define BENCH_D_COLS (8ULL)
|
||||||
#define BENCH_COLS (BENCH_D_COLS + PARITY_PQR)
|
#define BENCH_COLS (BENCH_D_COLS + PARITY_PQR)
|
||||||
#define BENCH_ZIO_SIZE (2ULL << 17) /* 128 kiB */
|
#define BENCH_ZIO_SIZE (1ULL << SPA_OLD_MAXBLOCKSHIFT) /* 128 kiB */
|
||||||
#define BENCH_NS MSEC2NSEC(25) /* 25ms */
|
#define BENCH_NS MSEC2NSEC(25) /* 25ms */
|
||||||
|
|
||||||
typedef void (*benchmark_fn)(raidz_map_t *rm, const int fn);
|
typedef void (*benchmark_fn)(raidz_map_t *rm, const int fn);
|
||||||
|
@ -211,6 +211,14 @@ static const struct {
|
|||||||
|
|
||||||
#include "vdev_raidz_math_impl.h"
|
#include "vdev_raidz_math_impl.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If compiled with -O0, gcc doesn't do any stack frame coalescing
|
||||||
|
* and -Wframe-larger-than=1024 is triggered in debug mode.
|
||||||
|
* Starting with gcc 4.8, new opt level -Og is introduced for debugging, which
|
||||||
|
* does not trigger this warning.
|
||||||
|
*/
|
||||||
|
#pragma GCC diagnostic ignored "-Wframe-larger-than="
|
||||||
|
|
||||||
DEFINE_GEN_METHODS(scalar);
|
DEFINE_GEN_METHODS(scalar);
|
||||||
DEFINE_REC_METHODS(scalar);
|
DEFINE_REC_METHODS(scalar);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user