]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: obsolete and remove mount option alloc_start
authorDavid Sterba <dsterba@suse.com>
Wed, 14 Jun 2017 23:30:06 +0000 (01:30 +0200)
committerDavid Sterba <dsterba@suse.com>
Tue, 20 Jun 2017 12:22:48 +0000 (14:22 +0200)
commit216a1b3787e8665e37abc9a5fc654d1d81b4f237
treec165272f5aded50b3c8b6be2490b7c787726153b
parent12446567759ead7165044937f3301ff8ba43874a
btrfs: obsolete and remove mount option alloc_start

The mount option alloc_start was used in the past for debugging and
stressing the chunk allocator. Not meant to be used by users, so we're
not breaking anybody's setup.

There was some added complexity handling changes of the value and when
it was not same as default. Such code has likely been untested and I
think it's better to remove it.

This patch kills all use of alloc_start, and by doing that also fixes
a bug when alloc_size is set, potentially called from statfs:

in btrfs_calc_avail_data_space, traversing the list in RCU, the RCU
protection is temporarily dropped so btrfs_account_dev_extents_size can
be called and then RCU is locked again! Doing that inside
list_for_each_entry_rcu is just asking for trouble, but unlikely to be
observed in practice.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/super.c
fs/btrfs/volumes.c