Re: [PATCH] Btrfs: fix race between balance recovery and root deletion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 26, 2014 at 11:08:16AM +0800, Wang Shilong wrote:
> Balance recovery is called when RW mounting or remounting from
> RO to RW, it is called to finish roots merging.
> 
> When doing balance recovery, relocation root's corresponding
> fs root(whose root refs is 0) might be destroyed by cleaner
> thread, this will make btrfs fail to mount.
> 
> Fix this problem by holding @cleaner_mutex when doing balance
> recovery.
> 
> Signed-off-by: Wang Shilong <wangsl.fnst@xxxxxxxxxxxxxx>

I don't pretend to understand all the dark corners of relocation, but
this looks as a correct fix to me. Relocation and cleaner are mutually
exclusive in the normal case.

Reviewed-by: David Sterba <dsterba@xxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux