]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: clean snapshots one by one
authorDavid Sterba <dsterba@suse.cz>
Tue, 12 Mar 2013 15:13:28 +0000 (15:13 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 6 May 2013 19:54:21 +0000 (15:54 -0400)
commit890c9ac95a9bedb85786a79819e8e7503abe9ab8
tree1648c620a5264275004bd09c207292697b450367
parentfda6c3932a693fca9fe226654e54bf5e3abea5ee
btrfs: clean snapshots one by one

Each time pick one dead root from the list and let the caller know if
it's needed to continue. This should improve responsiveness during
umount and balance which at some point waits for cleaning all currently
queued dead roots.

A new dead root is added to the end of the list, so the snapshots
disappear in the order of deletion.

The snapshot cleaning work is now done only from the cleaner thread and the
others wake it if needed.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/relocation.c
fs/btrfs/transaction.c
fs/btrfs/transaction.h