zfsonlinux/zfs — pull request #1914 by kohsuke (2013-11-30 21:56:14+00:00)
Title: dmu_tx_quota kstat is not being bumped anywhere.

It looks like 13fe019870c8779bf2f5b3ff731b512cf89133ef had removed
the code that bumped it.

I'm adding this to two places, instead of just resurrecting where it
should have been (the result of dsl_dataset_check_quota call). The
second addition is where we check the requested reservation against the
actual pool size, as I think of it as implicit quota of a sort.

I was hitting this second mode of throttling a lot when I was using
small 2GB test pool and writing 100MB file in it, because of
spa_get_asize inflation problem I discuss in pull request #1913.