From be23d3b87c306ed406478542d121d908730aa2e8 Mon Sep 17 00:00:00 2001 From: mav Date: Sat, 29 Oct 2016 23:25:12 +0000 Subject: [PATCH] Add sysctls for zfs_immediate_write_sz and zvol_immediate_write_sz. --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c | 5 +++++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c index 6933ccdacd16..049b958605d8 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c @@ -454,6 +454,11 @@ zfs_log_rename(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype, * Handles TX_WRITE transactions. */ ssize_t zfs_immediate_write_sz = 32768; +#ifdef _KERNEL +SYSCTL_DECL(_vfs_zfs); +SYSCTL_LONG(_vfs_zfs, OID_AUTO, immediate_write_sz, CTLFLAG_RWTUN, + &zfs_immediate_write_sz, 0, "Minimal size for indirect log write"); +#endif void zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype, diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c index 832847e30258..4965dde36f43 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c @@ -1375,6 +1375,10 @@ zvol_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio) * Otherwise we will later flush the data out via dmu_sync(). */ ssize_t zvol_immediate_write_sz = 32768; +#ifdef _KERNEL +SYSCTL_LONG(_vfs_zfs_vol, OID_AUTO, immediate_write_sz, CTLFLAG_RWTUN, + &zvol_immediate_write_sz, 0, "Minimal size for indirect log write"); +#endif static void zvol_log_write(zvol_state_t *zv, dmu_tx_t *tx, offset_t off, ssize_t resid,