]> git.karo-electronics.de Git - karo-tx-linux.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)
commit0d0c71b317207082856f40dbe8a2bac813f49677
treec165272f5aded50b3c8b6be2490b7c787726153b
parentfac03c8daeb581e2bc38e5a8c0c6a42cf87cf1c3
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