Re: [PATCH] Btrfs: keep dropped roots in cache until transaciton commit

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

 



On Fri, Sep 11, 2015 at 09:25:25AM +0800, Qu Wenruo wrote:
> Josef Bacik wrote on 2015/09/10 16:27 -0400:
> >When dropping a snapshot we need to account for the qgroup changes.  If we drop
> >the snapshot in all one go then the backref code will fail to find blocks from
> >the snapshot we dropped since it won't be able to find the root in the fs root
> >cache.  This can lead to us failing to find refs from other roots that pointed
> >at blocks in the now deleted root.  To handle this we need to not remove the fs
> >roots from the cache until after we process the qgroup operations.  Do this by
> >adding dropped roots to a list on the transaction, and letting the transaction
> >remove the roots at the same time it drops the commit roots.  This will keep all
> >of the backref searching code in sync properly, and fixes a problem Mark was
> >seeing with snapshot delete and qgroups.  Thanks,Btrfs: keep dropped roots in
> >cache until transaciton commit
> 
> Mark will definitely be happy with this patch, as quite a good basis
> for snapshot deletion.

Indeed. My tests against a kernel with Josefs patches and my snapshot
deletion code seem to be passing. I'll have something on the list shortly.

Thanks,
	--Mark

--
Mark Fasheh
--
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