Re: [PATCH 2/2] Btrfs: use a lock to protect incompat/compat flag of the super block

2013-04-21 Thread Miao Xie
On thu, 18 Apr 2013 00:17:11 +0200, David Sterba wrote: On Thu, Apr 11, 2013 at 06:30:16PM +0800, Miao Xie wrote: 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

Re: [PATCH 2/2] Btrfs: use a lock to protect incompat/compat flag of the super block

2013-04-17 Thread David Sterba
On Thu, Apr 11, 2013 at 06:30:16PM +0800, Miao Xie wrote: 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. + /* + * Used to protect the

[PATCH 2/2] Btrfs: use a lock to protect incompat/compat flag of the super block

2013-04-11 Thread Miao Xie
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;|