Btrfs: use seqlock to protect fs_info->avail_{data, metadata, system}_alloc_bits
authorMiao Xie <miaox@cn.fujitsu.com>
Tue, 29 Jan 2013 10:13:12 +0000 (10:13 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Wed, 20 Feb 2013 17:59:08 +0000 (12:59 -0500)
commitde98ced9e743656d108de41841797def0f5cb951
tree52314be4abe2cd2510712e8b629d58d8d01d5e0a
parentdf0af1a57f72c74d53a9377c60ff20095afab97d
Btrfs: use seqlock to protect fs_info->avail_{data, metadata, system}_alloc_bits

There is no lock to protect
  fs_info->avail_{data, metadata, system}_alloc_bits,
it may introduce some problem, such as the wrong profile
information, so we add a seqlock to protect them.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/volumes.c