Hello David, Anand,

> On Mon, Oct 07, 2013 at 10:47:56AM +0800, Anand Jain wrote:
>>  I was also thinking if this should be inside kernel
>>  facilitated by a new ioctl? so that we avoid number
>>  of search ioctl thats required.
> 
> I think so. And for the feature itself, it can be handy in case where
> qgroups are not established.

Actually, i have not found an effectively way to work out this.

Whatever we implement this as an ioctl in kernel space or just in userspace,
why not just trigger quota enabled, but not set qgroup limit.

If quota been enabled, quota rescan will calculate every subvolume's
referenced and exclusive size(to implement this we have to iterate extent tree 
though).

Luckily, after that, quota itself will track every subvolume's sole 
size(exclusive size).

Justing using 'btrfs qgroup show', we can figure out every subvolume's  
referenced size
and exclusive size easily, i think this is another important use of qgroup.

If users want to find top subvolume's sole size, they can use:

btrfs qgroup show  <mnt>  --sort=+/-excl

This approach maybe a little tricky,  but it is better than implement an ioctl 
to calculate
one subvolume's size every time.


Thanks,
Wang
> 
> david

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