]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/txg.c
replace nreserved with ndirty in txgs kstat
authorNed Bass <bass6@llnl.gov>
Fri, 28 Feb 2014 00:32:36 +0000 (16:32 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 4 Mar 2014 20:22:24 +0000 (12:22 -0800)
commit3ccab25205cc8836ceb79bbd164208021468233a
treec16c14ea1aea2c71364df3b6efa213c8ba7f4c11
parent3d920a1567d550273413a741c5fbece42cea6f00
replace nreserved with ndirty in txgs kstat

The nreserved column in the txgs kstat file always contains 0
following the write throttle restructuring of commit
e8b96c6007bf97cdf34869c1ffbd0ce753873a3d.

Prior to that commit, the nreserved column showed the number of bytes
temporarily reserved in the pool by a transaction group at sync time.
The new write throttle did away with temporary reservations and uses
the amount of dirty data instead.  To approximate the old output of
the txgs kstat, the number of dirty bytes per-txg was passed in as
the nreserved value to spa_txg_history_set_io().  This approach did
not work as intended, because the per-txg dirty value is decremented
as data is written out to disk, so it is zero by the time we call
spa_txg_history_set_io().  To fix this, save the number of dirty
bytes before calling spa_sync(), and pass this value in to
spa_txg_history_set_io().

Also, since the name "nreserved" is now a misnomer, the column
heading is now labeled "ndirty".

Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1696
include/sys/spa.h
module/zfs/spa_stats.c
module/zfs/txg.c