Miao Xie ceda086424 Btrfs: use a lock to protect incompat/compat flag of the super block
The following case will make the incompat/compat flag of the super block
be recovered.
 Task1					|Task2
 flags = btrfs_super_incompat_flags();	|
					|flags = btrfs_super_incompat_flags();
 flags |= new_flag1;			|
					|flags |= new_flag2;
 btrfs_set_super_incompat_flags(flags);	|
					|btrfs_set_super_incompat_flags(flags);
the new_flag1 is recovered.

In order to avoid this problem, we introduce a lock named super_lock into
the btrfs_fs_info structure. If we want to update incompat/compat flags
of the super block, we must hold it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
2013-05-06 15:54:46 -04:00
..
2013-05-06 15:54:34 -04:00
2012-12-17 14:48:21 -05:00
2008-09-25 11:04:06 -04:00
2013-05-06 15:54:34 -04:00
2013-05-06 15:54:34 -04:00
2013-05-06 15:54:34 -04:00
2012-10-09 09:14:45 -04:00
2012-10-09 09:14:45 -04:00
2013-05-06 15:54:22 -04:00
2013-02-20 09:37:17 -05:00
2013-03-14 14:57:10 -04:00
2013-02-01 14:24:23 -05:00
2013-02-01 14:24:23 -05:00
2013-05-06 15:54:34 -04:00
2013-05-06 15:54:34 -04:00
2012-10-09 09:19:57 -04:00