aboutsummaryrefslogtreecommitdiffstats
path: root/uts
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2018-09-21 20:36:26 +0000
committerAlexander Motin <mav@FreeBSD.org>2018-09-21 20:36:26 +0000
commite8551db9502c10ea24bfa13d42b301a2fd28e08c (patch)
tree5ef7718adc8a3390458c9c469c0803b19bf4d2c2 /uts
parent81347f19407b91e0597495ed5eb7a57f516b2467 (diff)
downloadsrc-e8551db9502c10ea24bfa13d42b301a2fd28e08c.tar.gz
src-e8551db9502c10ea24bfa13d42b301a2fd28e08c.zip
9626 move 'static xuio_stats_t xuio_stats' to file where it use
illumos/illumos-gate@857c96d257470e097e846ab8886580991b329c32 Reviewed by: Yuri Pankov <yuripv@yuripv.net> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Dan McDonald <danmcd@joyent.com> Author: Igor Kozhukhov <igor@dilos.org>
Notes
Notes: svn path=/vendor-sys/illumos/dist/; revision=338865
Diffstat (limited to 'uts')
-rw-r--r--uts/common/fs/zfs/dmu.c22
-rw-r--r--uts/common/fs/zfs/sys/dmu_impl.h14
2 files changed, 20 insertions, 16 deletions
diff --git a/uts/common/fs/zfs/dmu.c b/uts/common/fs/zfs/dmu.c
index 15123f347b61..23b1c52212c7 100644
--- a/uts/common/fs/zfs/dmu.c
+++ b/uts/common/fs/zfs/dmu.c
@@ -20,11 +20,14 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ */
+/*
+ * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
+ * Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ * Copyright 2016 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2011, 2017 by Delphix. All rights reserved.
+ * Copyright (c) 2018 DilOS
*/
-/* Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */
-/* Copyright (c) 2013, Joyent, Inc. All rights reserved. */
-/* Copyright 2016 Nexenta Systems, Inc. All rights reserved. */
#include <sys/dmu.h>
#include <sys/dmu_impl.h>
@@ -52,6 +55,19 @@
#include <sys/zfs_znode.h>
#endif
+static xuio_stats_t xuio_stats = {
+ { "onloan_read_buf", KSTAT_DATA_UINT64 },
+ { "onloan_write_buf", KSTAT_DATA_UINT64 },
+ { "read_buf_copied", KSTAT_DATA_UINT64 },
+ { "read_buf_nocopy", KSTAT_DATA_UINT64 },
+ { "write_buf_copied", KSTAT_DATA_UINT64 },
+ { "write_buf_nocopy", KSTAT_DATA_UINT64 }
+};
+
+#define XUIOSTAT_INCR(stat, val) \
+ atomic_add_64(&xuio_stats.stat.value.ui64, (val))
+#define XUIOSTAT_BUMP(stat) XUIOSTAT_INCR(stat, 1)
+
/*
* Enable/disable nopwrite feature.
*/
diff --git a/uts/common/fs/zfs/sys/dmu_impl.h b/uts/common/fs/zfs/sys/dmu_impl.h
index d0636b756067..0930be6a8506 100644
--- a/uts/common/fs/zfs/sys/dmu_impl.h
+++ b/uts/common/fs/zfs/sys/dmu_impl.h
@@ -25,6 +25,7 @@
/*
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
* Copyright (c) 2013, 2015 by Delphix. All rights reserved.
+ * Copyright (c) 2018 DilOS
*/
#ifndef _SYS_DMU_IMPL_H
@@ -254,19 +255,6 @@ typedef struct xuio_stats {
kstat_named_t xuiostat_wbuf_nocopy;
} xuio_stats_t;
-static xuio_stats_t xuio_stats = {
- { "onloan_read_buf", KSTAT_DATA_UINT64 },
- { "onloan_write_buf", KSTAT_DATA_UINT64 },
- { "read_buf_copied", KSTAT_DATA_UINT64 },
- { "read_buf_nocopy", KSTAT_DATA_UINT64 },
- { "write_buf_copied", KSTAT_DATA_UINT64 },
- { "write_buf_nocopy", KSTAT_DATA_UINT64 }
-};
-
-#define XUIOSTAT_INCR(stat, val) \
- atomic_add_64(&xuio_stats.stat.value.ui64, (val))
-#define XUIOSTAT_BUMP(stat) XUIOSTAT_INCR(stat, 1)
-
/*
* The list of data whose inclusion in a send stream can be pending from
* one call to backup_cb to another. Multiple calls to dump_free() and