Date: Fri, 2 Sep 2016 04:06:44 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r305271 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201609020406.u8246i1N017728@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Fri Sep 2 04:06:44 2016 New Revision: 305271 URL: https://svnweb.freebsd.org/changeset/base/305271 Log: MFC r303576: Conditionalize code which defines sysctls per _KERNEL #ifdef guard This resolves several issues when compiling libzpool (userspace library), i.e. -Wimplicit-function-declaration and -Wmissing-declarations issues. Tested with: clang 3.8.1, gcc 4.2.1, gcc 5.3.0 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Fri Sep 2 03:19:55 2016 (r305270) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Fri Sep 2 04:06:44 2016 (r305271) @@ -58,9 +58,11 @@ typedef struct mirror_map { static int vdev_mirror_shift = 21; +#ifdef _KERNEL SYSCTL_DECL(_vfs_zfs_vdev); static SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, mirror, CTLFLAG_RD, 0, "ZFS VDEV Mirror"); +#endif /* * The load configuration settings below are tuned by default for @@ -74,28 +76,38 @@ static SYSCTL_NODE(_vfs_zfs_vdev, OID_AU /* Rotating media load calculation configuration. */ static int rotating_inc = 0; +#ifdef _KERNEL SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, rotating_inc, CTLFLAG_RWTUN, &rotating_inc, 0, "Rotating media load increment for non-seeking I/O's"); +#endif static int rotating_seek_inc = 5; +#ifdef _KERNEL SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, rotating_seek_inc, CTLFLAG_RWTUN, &rotating_seek_inc, 0, "Rotating media load increment for seeking I/O's"); +#endif static int rotating_seek_offset = 1 * 1024 * 1024; +#ifdef _KERNEL SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, rotating_seek_offset, CTLFLAG_RWTUN, &rotating_seek_offset, 0, "Offset in bytes from the last I/O which " "triggers a reduced rotating media seek increment"); +#endif /* Non-rotating media load calculation configuration. */ static int non_rotating_inc = 0; +#ifdef _KERNEL SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, non_rotating_inc, CTLFLAG_RWTUN, &non_rotating_inc, 0, "Non-rotating media load increment for non-seeking I/O's"); +#endif static int non_rotating_seek_inc = 1; +#ifdef _KERNEL SYSCTL_INT(_vfs_zfs_vdev_mirror, OID_AUTO, non_rotating_seek_inc, CTLFLAG_RWTUN, &non_rotating_seek_inc, 0, "Non-rotating media load increment for seeking I/O's"); +#endif static inline size_t Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Fri Sep 2 03:19:55 2016 (r305270) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Fri Sep 2 04:06:44 2016 (r305271) @@ -176,6 +176,7 @@ int zfs_vdev_read_gap_limit = 32 << 10; int zfs_vdev_write_gap_limit = 4 << 10; #ifdef __FreeBSD__ +#ifdef _KERNEL SYSCTL_DECL(_vfs_zfs_vdev); static int sysctl_zfs_async_write_active_min_dirty_percent(SYSCTL_HANDLER_ARGS); @@ -271,6 +272,7 @@ sysctl_zfs_async_write_active_max_dirty_ return (0); } #endif +#endif int vdev_queue_offset_compare(const void *x1, const void *x2)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609020406.u8246i1N017728>