On 10/09/2013 04:03 PM, Anand Jain wrote:
> Wang,
>
>
>> 1. First to search inline extent_data
>> 2. Secondly search in extent tree to calculate (extent refs=1)
> but these extents will be of entire fs, how do you filter it for a subvol ?
Sorry, this could not be true as i have expected,(we have to iterate
extent tree with my approach)

If we considered both metadata and data for a subvolume, we just iterate
all the extent items in
the extent tree and add those extents into subvolume's sole size iff:

1> extent ref=1
2> backref root=subvol

However, this also may come very *slowly* when extent tree comes very large.

Thanks,
Wang
>  
>
> Thanks, Anand
>
>> This will avoid n*n rather than n+n which is better…
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to