diff options
author | trasz <trasz@FreeBSD.org> | 2016-01-23 12:13:09 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2016-01-23 12:13:09 +0000 |
commit | 81dd6a7bca26743c0a067f0ada2755269bef1789 (patch) | |
tree | 1259f7f83914aa2c53231981afebf974c8bd5606 | |
parent | a598a9ccf6f0ac43fbb4ed14018de843df926378 (diff) | |
download | FreeBSD-src-81dd6a7bca26743c0a067f0ada2755269bef1789.zip FreeBSD-src-81dd6a7bca26743c0a067f0ada2755269bef1789.tar.gz |
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
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 ed3f19c..b60236f 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 { |