]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix loop writing of async reclaim
authorLiu Bo <bo.li.liu@oracle.com>
Wed, 10 Sep 2014 04:58:50 +0000 (12:58 +0800)
committerChris Mason <clm@fb.com>
Wed, 17 Sep 2014 20:38:25 +0000 (13:38 -0700)
commiteb40815ecb9ca42f20a5157aa7251df12d3e8035
treec90a31068b55da76f7e99d1d41981c779f918921
parent097c1021307a4a94d5fb3eb68d4136631215f7cf
Btrfs: fix loop writing of async reclaim

One of my tests shows that when we really don't have space to reclaim via
flush_space and also run out of space, this async reclaim work loops on adding
itself into the workqueue and keeps writing something to disk according to
iostat's results, and these writes mainly comes from commit_transaction which
writes super_block.  This's unacceptable as it can be bad to disks, especially
memeory storages.

This adds a check to avoid the above situation.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/extent-tree.c