From aa9b057c085d9d0786da50a1ade15ecba739ffce Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Sat, 23 Jan 2016 12:13:09 +0000 Subject: [PATCH] Fix ru_oublocks accounting for ZFS. There are two code paths that can be called from zfs_write() - one of them, through dmu_write(), was handled correctly; the other wasn't. Reviewed by: avg@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D4923 --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c index ed3f19cac856..b60236f6ff17 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c @@ -1420,6 +1420,9 @@ dmu_assign_arcbuf(dmu_buf_t *handle, uint64_t offset, arc_buf_t *buf, */ if (offset == db->db.db_offset && blksz == db->db.db_size && DBUF_GET_BUFC_TYPE(db) == ARC_BUFC_DATA) { +#ifdef _KERNEL + curthread->td_ru.ru_oublock++; +#endif dbuf_assign_arcbuf(db, buf, tx); dbuf_rele(db, FTAG); } else {